From 46d4b02941ecbf6c6f62c5e8a6b60e3765c3b16c Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Sat, 27 Jun 2020 14:48:12 +0300 Subject: [PATCH] Temporary initialization fix for VS Preview --- Telegram/SourceFiles/calls/calls_call.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/calls/calls_call.cpp index 511909785..293ff2db7 100644 --- a/Telegram/SourceFiles/calls/calls_call.cpp +++ b/Telegram/SourceFiles/calls/calls_call.cpp @@ -37,6 +37,17 @@ void AppendEndpoint( if (data.vpeer_tag().v.length() != 16) { return; } +#ifdef Q_OS_WIN + auto endpoint = TgVoipEndpoint(); + endpoint.endpointId = (int64_t)data.vid().v; + + endpoint.host = TgVoipEdpointHost(); + endpoint.host.ipv4 = data.vip().v.toStdString(); + endpoint.host.ipv6 = data.vipv6().v.toStdString(); + + endpoint.port = (uint16_t)data.vport().v; + endpoint.type = TgVoipEndpointType::UdpRelay; +#else auto endpoint = TgVoipEndpoint{ .endpointId = (int64_t)data.vid().v, .host = TgVoipEdpointHost{ @@ -45,6 +56,7 @@ void AppendEndpoint( .port = (uint16_t)data.vport().v, .type = TgVoipEndpointType::UdpRelay }; +#endif const auto tag = data.vpeer_tag().v; if (tag.size() >= 16) { memcpy(endpoint.peerTag, tag.data(), 16);