mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Changes based on debugging.
This commit is contained in:
@@ -234,15 +234,15 @@ void CDMRSlot::writeModem(unsigned char *data)
|
|||||||
|
|
||||||
writeNetwork(data, DT_CSBK, FLCO_USER_USER, csbk.getSrcId(), csbk.getDstId());
|
writeNetwork(data, DT_CSBK, FLCO_USER_USER, csbk.getSrcId(), csbk.getDstId());
|
||||||
writeQueue(data);
|
writeQueue(data);
|
||||||
|
|
||||||
|
LogMessage("DMR Slot %u, received RF CSBK from %u to %u", m_slotNo, csbk.getSrcId(), csbk.getDstId());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
LogMessage("DMR Slot %u, received CSBK", m_slotNo);
|
|
||||||
} else {
|
} else {
|
||||||
// Regenerate the Slot Type
|
// Regenerate the Slot Type
|
||||||
slotType.getData(data + 2U);
|
slotType.getData(data + 2U);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
const unsigned int BUFFER_LENGTH = 100U;
|
const unsigned int BUFFER_LENGTH = 100U;
|
||||||
|
|
||||||
CDStarNetwork::CDStarNetwork(const std::string& gatewayAddress, unsigned int gatewayPort, unsigned int localPort, bool debug) :
|
CDStarNetwork::CDStarNetwork(const std::string& gatewayAddress, unsigned int gatewayPort, unsigned int localPort, bool debug) :
|
||||||
m_socket("", localPort),
|
m_socket(localPort),
|
||||||
m_address(),
|
m_address(),
|
||||||
m_port(gatewayPort),
|
m_port(gatewayPort),
|
||||||
m_debug(debug),
|
m_debug(debug),
|
||||||
|
|||||||
@@ -43,6 +43,21 @@ m_fd(-1)
|
|||||||
#endif
|
#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() :
|
CUDPSocket::CUDPSocket() :
|
||||||
m_address(),
|
m_address(),
|
||||||
m_port(0U),
|
m_port(0U),
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
class CUDPSocket {
|
class CUDPSocket {
|
||||||
public:
|
public:
|
||||||
CUDPSocket(const std::string& address, unsigned int port);
|
CUDPSocket(const std::string& address, unsigned int port);
|
||||||
|
CUDPSocket(unsigned int port);
|
||||||
CUDPSocket();
|
CUDPSocket();
|
||||||
~CUDPSocket();
|
~CUDPSocket();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user