Changes based on debugging.

This commit is contained in:
Jonathan Naylor 2016-01-25 22:36:16 +00:00
parent 3f76ade5c4
commit 8860b72e6c
4 changed files with 20 additions and 4 deletions

View file

@ -234,15 +234,15 @@ void CDMRSlot::writeModem(unsigned char *data)
writeNetwork(data, DT_CSBK, FLCO_USER_USER, csbk.getSrcId(), csbk.getDstId());
writeQueue(data);
LogMessage("DMR Slot %u, received RF CSBK from %u to %u", m_slotNo, csbk.getSrcId(), csbk.getDstId());
}
break;
default:
LogWarning("DMR Slot %u, unhandled CSBK type - 0x%02X", m_slotNo, csbko);
LogWarning("DMR Slot %u, unhandled RF CSBK type - 0x%02X", m_slotNo, csbko);
break;
}
LogMessage("DMR Slot %u, received CSBK", m_slotNo);
} else {
// Regenerate the Slot Type
slotType.getData(data + 2U);

View file

@ -29,7 +29,7 @@
const unsigned int BUFFER_LENGTH = 100U;
CDStarNetwork::CDStarNetwork(const std::string& gatewayAddress, unsigned int gatewayPort, unsigned int localPort, bool debug) :
m_socket("", localPort),
m_socket(localPort),
m_address(),
m_port(gatewayPort),
m_debug(debug),

View file

@ -43,6 +43,21 @@ m_fd(-1)
#endif
}
CUDPSocket::CUDPSocket(unsigned int port) :
m_address(),
m_port(port),
m_fd(-1)
{
assert(port > 0U);
#if defined(_WIN32) || defined(_WIN64)
WSAData data;
int wsaRet = ::WSAStartup(MAKEWORD(2, 2), &data);
if (wsaRet != 0)
LogError("Error from WSAStartup");
#endif
}
CUDPSocket::CUDPSocket() :
m_address(),
m_port(0U),

View file

@ -37,6 +37,7 @@
class CUDPSocket {
public:
CUDPSocket(const std::string& address, unsigned int port);
CUDPSocket(unsigned int port);
CUDPSocket();
~CUDPSocket();