mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-29 13:47:47 +00:00
Temporary initialization fix for VS Preview
This commit is contained in:
parent
fb6919fc40
commit
46d4b02941
@ -37,6 +37,17 @@ void AppendEndpoint(
|
|||||||
if (data.vpeer_tag().v.length() != 16) {
|
if (data.vpeer_tag().v.length() != 16) {
|
||||||
return;
|
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{
|
auto endpoint = TgVoipEndpoint{
|
||||||
.endpointId = (int64_t)data.vid().v,
|
.endpointId = (int64_t)data.vid().v,
|
||||||
.host = TgVoipEdpointHost{
|
.host = TgVoipEdpointHost{
|
||||||
@ -45,6 +56,7 @@ void AppendEndpoint(
|
|||||||
.port = (uint16_t)data.vport().v,
|
.port = (uint16_t)data.vport().v,
|
||||||
.type = TgVoipEndpointType::UdpRelay
|
.type = TgVoipEndpointType::UdpRelay
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
const auto tag = data.vpeer_tag().v;
|
const auto tag = data.vpeer_tag().v;
|
||||||
if (tag.size() >= 16) {
|
if (tag.size() >= 16) {
|
||||||
memcpy(endpoint.peerTag, tag.data(), 16);
|
memcpy(endpoint.peerTag, tag.data(), 16);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user