ICOM G3: rewrite with CUdpSocket::Open(uiPort, af = AF_INET)

For a while, this code is needed to surpress unwanted UDP port listening.
If ICOM will implement G3 on IPv6, this should be reverted.
pull/189/head
SASANO Takayoshi 5 years ago
parent 690d234351
commit 358911ec68

@ -59,14 +59,14 @@ bool CG3Protocol::Init(void)
m_ReflectorCallsign.PatchCallsign(0, (const uint8 *)"XLX", 3);
// create our DV socket
ok &= m_Socket.Open(G3_DV_PORT);
ok &= m_Socket.Open(G3_DV_PORT, AF_INET);
if ( !ok )
{
std::cout << "Error opening socket on port UDP" << G3_DV_PORT << " on ip " << g_Reflector.GetListenIp() << std::endl;
}
//create helper sockets
ok &= m_PresenceSocket.Open(G3_PRESENCE_PORT);
ok &= m_PresenceSocket.Open(G3_PRESENCE_PORT, AF_INET);
if ( !ok )
{
std::cout << "Error opening socket on port UDP" << G3_PRESENCE_PORT << " on ip " << g_Reflector.GetListenIp() << std::endl;

@ -38,7 +38,7 @@ bool CUdpMsgSocket::Open(uint16 uiPort)
struct sockaddr_storage *ss;
socklen_t ss_len;
if ( !CUdpSocket::Open(uiPort) )
if ( !CUdpSocket::Open(uiPort, AF_INET) )
{
return false;
}

Loading…
Cancel
Save

Powered by TurnKey Linux.