summaryrefslogtreecommitdiff
path: root/protocols/Discord/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-06-13 18:03:26 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-06-13 18:03:26 +0300
commit3a4d5709c73fa0495138857f7bdb7a49e9e8a80a (patch)
treed29499ee8454a6c795475a18bf35cd7d09696885 /protocols/Discord/src
parent004f3d1f49c54bc62743a838161ac157ffc37e41 (diff)
NETLIBBIND to be able to open UDP external ports
Diffstat (limited to 'protocols/Discord/src')
-rw-r--r--protocols/Discord/src/voice_client.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/Discord/src/voice_client.cpp b/protocols/Discord/src/voice_client.cpp
index 29b051799f..1e20a93723 100644
--- a/protocols/Discord/src/voice_client.cpp
+++ b/protocols/Discord/src/voice_client.cpp
@@ -132,8 +132,9 @@ void CDiscordVoiceCall::processStreams(const JSONNode &d)
}
NETLIBBIND nlb = {};
- nlb.pfnNewConnection = &GetConnection;
+ nlb.iType = SOCK_DGRAM; // UDP connection
nlb.pExtra = this;
+ nlb.pfnNewConnection = &GetConnection;
m_hBind = Netlib_BindPort(ppro->m_hGatewayNetlibUser, &nlb);
if (m_hBind == nullptr) {
ppro->debugLogA("UDP port binding failed, exiting");