Merge branch 'AX25' into AX25_FM
This commit is contained in:
commit
4d3869172d
2 changed files with 10 additions and 2 deletions
|
@ -56,7 +56,8 @@ m_rtcpTimer(1000U, 0U, 200U),
|
||||||
m_hangTimer(1000U, 5U),
|
m_hangTimer(1000U, 5U),
|
||||||
m_hangType(0U),
|
m_hangType(0U),
|
||||||
m_hangSrc(0U),
|
m_hangSrc(0U),
|
||||||
m_hangDst(0U)
|
m_hangDst(0U),
|
||||||
|
m_random()
|
||||||
{
|
{
|
||||||
assert(localPort > 0U);
|
assert(localPort > 0U);
|
||||||
assert(!gwyAddress.empty());
|
assert(!gwyAddress.empty());
|
||||||
|
@ -65,6 +66,10 @@ m_hangDst(0U)
|
||||||
m_sacch = new unsigned char[10U];
|
m_sacch = new unsigned char[10U];
|
||||||
|
|
||||||
m_address = CUDPSocket::lookup(gwyAddress);
|
m_address = CUDPSocket::lookup(gwyAddress);
|
||||||
|
|
||||||
|
std::random_device rd;
|
||||||
|
std::mt19937 mt(rd());
|
||||||
|
m_random = mt;
|
||||||
}
|
}
|
||||||
|
|
||||||
CNXDNKenwoodNetwork::~CNXDNKenwoodNetwork()
|
CNXDNKenwoodNetwork::~CNXDNKenwoodNetwork()
|
||||||
|
@ -87,7 +92,8 @@ bool CNXDNKenwoodNetwork::open()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_ssrc = m_rtpSocket.getLocalAddress();
|
std::uniform_int_distribution<unsigned int> dist(0x00000001, 0xfffffffe);
|
||||||
|
m_ssrc = dist(m_random);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <random>
|
||||||
|
|
||||||
class CNXDNKenwoodNetwork : public INXDNNetwork {
|
class CNXDNKenwoodNetwork : public INXDNNetwork {
|
||||||
public:
|
public:
|
||||||
|
@ -69,6 +70,7 @@ private:
|
||||||
unsigned char m_hangType;
|
unsigned char m_hangType;
|
||||||
unsigned short m_hangSrc;
|
unsigned short m_hangSrc;
|
||||||
unsigned short m_hangDst;
|
unsigned short m_hangDst;
|
||||||
|
std::mt19937 m_random;
|
||||||
|
|
||||||
bool processIcomVoiceHeader(const unsigned char* data);
|
bool processIcomVoiceHeader(const unsigned char* data);
|
||||||
bool processIcomVoiceData(const unsigned char* data);
|
bool processIcomVoiceData(const unsigned char* data);
|
||||||
|
|
Loading…
Reference in a new issue