Merge branch 'develop' into develop

pull/66/head
Jonathan Naylor 2 months ago committed by GitHub
commit 12d94dc7ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -69,7 +69,7 @@ void CG2Handler::process(CHeaderData& header)
{
// Is this a busy reply?
unsigned char flag1 = header.getFlag1();
if (flag1 == 0x01) {
if (flag1 == 0x01) {
// Don't check the incoming stream
// CLog::logInfo("G2 busy message received"));
return;
@ -90,19 +90,35 @@ void CG2Handler::process(CHeaderData& header)
in_addr address = header.getYourAddress();
unsigned int id = header.getId();
// Find the destination repeater
CRepeaterHandler* repeater = CRepeaterHandler::findDVRepeater(header.getRptCall2());
CRepeaterHandler *repeater = CRepeaterHandler::findDVRepeater(header.getRptCall2());
if (repeater == NULL) {
CLog::logInfo("Incoming G2 header from %s to unknown repeater - %s", header.getMyCall1().c_str(), header.getRptCall2().c_str());
return; // Not found, ignore
return; // Not found, ignore
}
CG2Handler* route = new CG2Handler(repeater, address, id);
CG2Handler *route = new CG2Handler(repeater, address, id);
for (unsigned int i = 0U; i < m_maxRoutes; i++) {
if (m_routes[i] == NULL) {
m_routes[i] = route;
for (unsigned int i = 0U; i < m_maxRoutes; i++)
{
if (m_routes[i] != NULL)
{
if (m_routes[i]->m_id == id)
{
// This should never happen, but if it does, delete the old route and replace it with the new one
CLog::logDebug("Duplicate G2 route received, replacing existing route");
delete m_routes[i];
m_routes[i] = route;
repeater->process(header, DIR_INCOMING, AS_G2);
return;
}
}
else {
if (m_routes[i] == NULL) {
m_routes[i] = route;
repeater->process(header, DIR_INCOMING, AS_G2);
return;

@ -158,6 +158,7 @@ The testing framwework used is Google Test.
# 6. Version History
## 6.1. Version 1.0
- [**Bugfix**] Fix duplicate G2 routes ([#64](https://github.com/F4FXL/DStarGateway/issues/64))
- [**Bugfix**] Fix decoding of DTMF commands with leading 0 ([#61](https://github.com/F4FXL/DStarGateway/issues/61))
- [**Improvement**] Add second French voice ([#60](https://github.com/F4FXL/DStarGateway/issues/60))
- [**Improvement**] Clarify French "Linking to" announcement ([#60](https://github.com/F4FXL/DStarGateway/issues/60))

Loading…
Cancel
Save

Powered by TurnKey Linux.