mirror of
https://github.com/ShaYmez/NXDNClients.git
synced 2024-11-25 16:48:40 -05:00
Alter the way that the NXDN Network is opened for IPv4 and IPv6.
This commit is contained in:
parent
6671e87173
commit
75cefde80a
@ -43,11 +43,16 @@ bool CNXDNNetwork::open()
|
||||
{
|
||||
LogInfo("Opening NXDN network connection");
|
||||
|
||||
bool ret = m_socket.open(0, PF_INET, "", m_port);
|
||||
if (!ret)
|
||||
return false;
|
||||
unsigned int index = 0U;
|
||||
|
||||
return m_socket.open(1, PF_INET6, "", m_port);
|
||||
bool ret1 = m_socket.open(index, PF_INET, "", m_port);
|
||||
if (ret1)
|
||||
index++;
|
||||
|
||||
bool ret2 = m_socket.open(index, PF_INET6, "", m_port);
|
||||
|
||||
// We're OK as long as we have either IPv4 or IPv6 or both.
|
||||
return ret1 || ret2;
|
||||
}
|
||||
|
||||
bool CNXDNNetwork::writeData(const unsigned char* data, unsigned int length, unsigned short srcId, unsigned short dstId, bool grp, const sockaddr_storage& addr, unsigned int addrLen)
|
||||
|
@ -19,6 +19,6 @@
|
||||
#if !defined(VERSION_H)
|
||||
#define VERSION_H
|
||||
|
||||
const char* VERSION = "20201104";
|
||||
const char* VERSION = "20201105";
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user