From 9fbfc00b36414c83bcd9b14d768a4f298debe2f3 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 16 Aug 2025 08:25:23 +0200 Subject: [PATCH 01/10] Add more log messages #57 --- Common/RemoteHandler.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Common/RemoteHandler.cpp b/Common/RemoteHandler.cpp index 7372e98..09f922f 100644 --- a/Common/RemoteHandler.cpp +++ b/Common/RemoteHandler.cpp @@ -95,9 +95,9 @@ void CRemoteHandler::process() RECONNECT reconnect; m_handler.readLink(callsign, reconnect, reflector); if (reflector.empty()) - CLog::logInfo("Remote control user has linked \"%s\" to \"None\" with reconnect %d", callsign.c_str(), int(reconnect)); + CLog::logInfo("Remote control user requesting link \"%s\" to \"None\" with reconnect %d", callsign.c_str(), int(reconnect)); else - CLog::logInfo("Remote control user has linked \"%s\" to \"%s\" with reconnect %d", callsign.c_str(), reflector.c_str(), int(reconnect)); + CLog::logInfo("Remote control user requesting link \"%s\" to \"%s\" with reconnect %d", callsign.c_str(), reflector.c_str(), int(reconnect)); link(callsign, reconnect, reflector, true); } break; @@ -105,7 +105,7 @@ void CRemoteHandler::process() std::string callsign, reflector; PROTOCOL protocol; m_handler.readUnlink(callsign, protocol, reflector); - CLog::logInfo("Remote control user has unlinked \"%s\" from \"%s\" for protocol %d", callsign.c_str(), reflector.c_str(), int(protocol)); + CLog::logInfo("Remote control user requesting unlink \"%s\" from \"%s\" for protocol %d", callsign.c_str(), reflector.c_str(), int(protocol)); unlink(callsign, protocol, reflector); } break; @@ -114,9 +114,9 @@ void CRemoteHandler::process() RECONNECT reconnect; m_handler.readLinkScr(callsign, reconnect, reflector); if (reflector.empty()) - CLog::logInfo("Remote control user has linked \"%s\" to \"None\" with reconnect %d from localhost", callsign.c_str(), reconnect); + CLog::logInfo("Remote control user requesting link \"%s\" to \"None\" with reconnect %d from localhost", callsign.c_str(), reconnect); else - CLog::logInfo("Remote control user has linked \"%s\" to \"%s\" with reconnect %d from localhost", callsign.c_str(), reflector.c_str(), reconnect); + CLog::logInfo("Remote control user requesting link \"%s\" to \"%s\" with reconnect %d from localhost", callsign.c_str(), reflector.c_str(), reconnect); link(callsign, reconnect, reflector, false); } break; @@ -155,6 +155,7 @@ void CRemoteHandler::sendRepeater(const std::string& callsign) { CRepeaterHandler* repeater = CRepeaterHandler::findDVRepeater(callsign); if (repeater == NULL) { + CLog::logInfo("Remote requesting invalid repeater \"%s\"", callsign.c_str()); m_handler.sendNAK("Invalid repeater callsign"); return; } @@ -195,6 +196,7 @@ void CRemoteHandler::link(const std::string& callsign, RECONNECT reconnect, cons { CRepeaterHandler* repeater = CRepeaterHandler::findDVRepeater(callsign); if (repeater == NULL) { + CLog::logInfo("Remote requesting link for invalid repeater \"%s\"", callsign.c_str()); m_handler.sendNAK("Invalid repeater callsign"); return; } @@ -209,6 +211,7 @@ void CRemoteHandler::unlink(const std::string& callsign, PROTOCOL protocol, cons { CRepeaterHandler* repeater = CRepeaterHandler::findDVRepeater(callsign); if (repeater == NULL) { + CLog::logInfo("Remote requesting unlink for invalid repeater \"%s\"", callsign.c_str()); m_handler.sendNAK("Invalid repeater callsign"); return; } From ffd9c0375d55426b2cefdb6db28c2afca26e0d68 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 16 Aug 2025 08:54:19 +0200 Subject: [PATCH 02/10] do not overwrite startup link #57 --- Common/RepeaterHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index 3fbb913..bbe07d6 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -1842,7 +1842,7 @@ void CRepeaterHandler::link(RECONNECT reconnect, const std::string& reflector) } #endif - m_linkStartup = reflector; + //m_linkStartup = reflector; m_linkReconnect = reconnect; m_linkReconnectTimer.stop(); @@ -1973,7 +1973,7 @@ void CRepeaterHandler::link(RECONNECT reconnect, const std::string& reflector) CDPlusHandler::unlink(this); CDCSHandler::unlink(this); - linkInt(m_linkStartup); + linkInt(reflector); } void CRepeaterHandler::unlink(PROTOCOL protocol, const std::string& reflector) From 9cf626eecdbf1f8dc3b5ed72c86419ccecd2f4d4 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 16 Aug 2025 09:04:38 +0200 Subject: [PATCH 03/10] do not print starnet command line usage #57 --- DGWRemoteControl/DGWRemoteControlApp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DGWRemoteControl/DGWRemoteControlApp.cpp b/DGWRemoteControl/DGWRemoteControlApp.cpp index 6f8c0fe..12e63fc 100644 --- a/DGWRemoteControl/DGWRemoteControlApp.cpp +++ b/DGWRemoteControl/DGWRemoteControlApp.cpp @@ -48,8 +48,11 @@ int main(int argc, const char* argv[]) ::fprintf(stderr, "\ndgwremotecontrol v%s : invalid command line usage:\n\n", LONG_VERSION.c_str()); ::fprintf(stderr, "\t\tdgwremotecontrol [-name ] link \n"); ::fprintf(stderr, "\t\tdgwremotecontrol [-name ] unlink\n"); +#ifdef USE_STARNET ::fprintf(stderr, "\t\tdgwremotecontrol [-name ] drop \n"); - ::fprintf(stderr, "\t\tdgwremotecontrol [-name ] drop all\n\n"); + ::fprintf(stderr, "\t\tdgwremotecontrol [-name ] drop all\n"); +#endif + ::fprintf(stderr, "\n"); return 1; } From 93ae2dfade7f23a6787983408a85abf29cd9913d Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 16 Aug 2025 09:06:19 +0200 Subject: [PATCH 04/10] Update readme #57 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6933f4f..44954a3 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,7 @@ The testing framwework used is Google Test. # 6. Version History ## 6.1. Version 1.0 +- [**Bugfix**] Fix repeater not reverting to startup reflector after issueing a command through remote control. ([#56](https://github.com/F4FXL/DStarGateway/issues/56)) - [**Bugfix**] Fix corrupted slow data leading to DV Text Message not being sent to ircddb. Thanks to Manfred DL1JM for all the testing. ([#55](https://github.com/F4FXL/DStarGateway/issues/55)) - [**Improvement**] Add version info to output of --version ([#56](https://github.com/F4FXL/DStarGateway/issues/56)) - [**Improvement**] Automatically download hosts files on startup. It is also possible to specify custom hosts files to override hosts from the internet. Needs some configuration adjustement, see example.cfg. ([#50](https://github.com/F4FXL/DStarGateway/issues/50)) From 9afe75976cc7f3c2c71d358337b8b2fa741c59a6 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 16 Aug 2025 09:15:23 +0200 Subject: [PATCH 05/10] fixed wrong port number in log --- Common/DCSProtocolHandlerPool.cpp | 2 +- Common/DExtraProtocolHandlerPool.cpp | 2 +- Common/DPlusProtocolHandlerPool.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/DCSProtocolHandlerPool.cpp b/Common/DCSProtocolHandlerPool.cpp index cc00e43..fd10f0f 100644 --- a/Common/DCSProtocolHandlerPool.cpp +++ b/Common/DCSProtocolHandlerPool.cpp @@ -84,7 +84,7 @@ void CDCSProtocolHandlerPool::release(CDCSProtocolHandler *handler) handler->close(); delete handler ; m_index = m_pool.end(); // since we removed an element, m_index is ouot of order, just move it back to the end - CLog::logInfo("Released DCS ProtocolHandler on port %u.\n", it->first); + CLog::logInfo("Released DCS ProtocolHandler on port %u.\n", handler->getPort()); return; } diff --git a/Common/DExtraProtocolHandlerPool.cpp b/Common/DExtraProtocolHandlerPool.cpp index c356858..c726259 100644 --- a/Common/DExtraProtocolHandlerPool.cpp +++ b/Common/DExtraProtocolHandlerPool.cpp @@ -84,7 +84,7 @@ void CDExtraProtocolHandlerPool::release(CDExtraProtocolHandler *handler) handler->close(); delete handler; m_index = m_pool.end(); // m_index might be out of order, reset it - CLog::logInfo("Releasing DExtra Protocol Handler on port %u.\n", it->first); + CLog::logInfo("Releasing DExtra Protocol Handler on port %u.\n", handler->getPort()); return; } diff --git a/Common/DPlusProtocolHandlerPool.cpp b/Common/DPlusProtocolHandlerPool.cpp index b9ef667..1b62276 100644 --- a/Common/DPlusProtocolHandlerPool.cpp +++ b/Common/DPlusProtocolHandlerPool.cpp @@ -85,7 +85,7 @@ void CDPlusProtocolHandlerPool::release(CDPlusProtocolHandler *handler) handler->close(); delete handler; m_index = m_pool.end(); // m_index might be ut of order so reset it - CLog::logInfo("Releasing DPlus ProtocolHandler on port %u.\n", it->first); + CLog::logInfo("Releasing DPlus ProtocolHandler on port %u.\n", handler->getPort()); return; } } From f6b92be4b122e4e04dbf8d9fc1e96aafcb8426d8 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 16 Aug 2025 09:28:38 +0200 Subject: [PATCH 06/10] Fix dump title going to wrong log target --- BaseCommon/Utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseCommon/Utils.cpp b/BaseCommon/Utils.cpp index c5d6746..da3c3e2 100644 --- a/BaseCommon/Utils.cpp +++ b/BaseCommon/Utils.cpp @@ -126,7 +126,7 @@ void CUtils::dump(const char* title, const unsigned char* data, unsigned int len assert(title != NULL); assert(data != NULL); - CLog::logInfo("%s\n", title); + CLog::logDebug("%s\n", title); unsigned int offset = 0U; From e0864623ee5c1302b0f3ed0e8998522f640d7d48 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 16 Aug 2025 09:31:00 +0200 Subject: [PATCH 07/10] do not overwrite reconnect time #57 --- Common/RepeaterHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index bbe07d6..df9fc2f 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -1843,11 +1843,11 @@ void CRepeaterHandler::link(RECONNECT reconnect, const std::string& reflector) #endif //m_linkStartup = reflector; - m_linkReconnect = reconnect; + //m_linkReconnect = reconnect; m_linkReconnectTimer.stop(); - switch (m_linkReconnect) { + switch (reconnect) { case RECONNECT_5MINS: m_linkReconnectTimer.start(5U * 60U); break; From 24ca3d73eacfdcfdf806c73ee5db5b096d7e963e Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 16 Aug 2025 10:50:10 +0200 Subject: [PATCH 08/10] make sure reconnect from config is use after reverting from remote initiated connect. Improve logging of reconnect time. #57 --- Common/Defs.h | 18 ++++++++ Common/RemoteHandler.cpp | 8 ++-- Common/RepeaterHandler.cpp | 92 +++++++++----------------------------- Common/RepeaterHandler.h | 2 + 4 files changed, 46 insertions(+), 74 deletions(-) diff --git a/Common/Defs.h b/Common/Defs.h index 9cb2d07..01edb0c 100644 --- a/Common/Defs.h +++ b/Common/Defs.h @@ -50,6 +50,24 @@ enum RECONNECT { RECONNECT_180MINS }; +inline const char* reconnectToString(RECONNECT r) { + switch (r) { + case RECONNECT_NEVER: return "never"; + case RECONNECT_FIXED: return "fixed"; + case RECONNECT_5MINS: return "5 minutes"; + case RECONNECT_10MINS: return "10 minutes"; + case RECONNECT_15MINS: return "15 minutes"; + case RECONNECT_20MINS: return "20 minutes"; + case RECONNECT_25MINS: return "25 minutes"; + case RECONNECT_30MINS: return "30 minutes"; + case RECONNECT_60MINS: return "60 minutes"; + case RECONNECT_90MINS: return "90 minutes"; + case RECONNECT_120MINS: return "120 minutes"; + case RECONNECT_180MINS: return "180 minutes"; + default: return "unknown"; + } +} + enum DIRECTION { DIR_INCOMING, DIR_OUTGOING diff --git a/Common/RemoteHandler.cpp b/Common/RemoteHandler.cpp index 09f922f..1722ec9 100644 --- a/Common/RemoteHandler.cpp +++ b/Common/RemoteHandler.cpp @@ -95,9 +95,9 @@ void CRemoteHandler::process() RECONNECT reconnect; m_handler.readLink(callsign, reconnect, reflector); if (reflector.empty()) - CLog::logInfo("Remote control user requesting link \"%s\" to \"None\" with reconnect %d", callsign.c_str(), int(reconnect)); + CLog::logInfo("Remote control user requesting link \"%s\" to \"None\" with reconnect %s", callsign.c_str(), reconnectToString(reconnect)); else - CLog::logInfo("Remote control user requesting link \"%s\" to \"%s\" with reconnect %d", callsign.c_str(), reflector.c_str(), int(reconnect)); + CLog::logInfo("Remote control user requesting link \"%s\" to \"%s\" with reconnect %s", callsign.c_str(), reflector.c_str(), reconnectToString(reconnect)); link(callsign, reconnect, reflector, true); } break; @@ -114,9 +114,9 @@ void CRemoteHandler::process() RECONNECT reconnect; m_handler.readLinkScr(callsign, reconnect, reflector); if (reflector.empty()) - CLog::logInfo("Remote control user requesting link \"%s\" to \"None\" with reconnect %d from localhost", callsign.c_str(), reconnect); + CLog::logInfo("Remote control user requesting link \"%s\" to \"None\" with reconnect %s from localhost", callsign.c_str(), reconnectToString(reconnect)); else - CLog::logInfo("Remote control user requesting link \"%s\" to \"%s\" with reconnect %d from localhost", callsign.c_str(), reflector.c_str(), reconnect); + CLog::logInfo("Remote control user requesting link \"%s\" to \"%s\" with reconnect %s from localhost", callsign.c_str(), reflector.c_str(), reconnectToString(reconnect)); link(callsign, reconnect, reflector, false); } break; diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index df9fc2f..380c0c8 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -169,40 +169,7 @@ m_heardTimer(1000U, 0U, 100U) // 100ms m_pollTimer.start(); - switch (m_linkReconnect) { - case RECONNECT_5MINS: - m_linkReconnectTimer.start(5U * 60U); - break; - case RECONNECT_10MINS: - m_linkReconnectTimer.start(10U * 60U); - break; - case RECONNECT_15MINS: - m_linkReconnectTimer.start(15U * 60U); - break; - case RECONNECT_20MINS: - m_linkReconnectTimer.start(20U * 60U); - break; - case RECONNECT_25MINS: - m_linkReconnectTimer.start(25U * 60U); - break; - case RECONNECT_30MINS: - m_linkReconnectTimer.start(30U * 60U); - break; - case RECONNECT_60MINS: - m_linkReconnectTimer.start(60U * 60U); - break; - case RECONNECT_90MINS: - m_linkReconnectTimer.start(90U * 60U); - break; - case RECONNECT_120MINS: - m_linkReconnectTimer.start(120U * 60U); - break; - case RECONNECT_180MINS: - m_linkReconnectTimer.start(180U * 60U); - break; - default: - break; - } + setReconnectTimer(m_linkReconnect); #ifdef USE_ANNOUNCE wxFileName messageFile; @@ -1504,7 +1471,7 @@ void CRepeaterHandler::clockInt(unsigned int ms) linkInt(m_linkStartup); } - m_linkReconnectTimer.start(); + setReconnectTimer(m_linkReconnect); } // If the ircDDB query timer has expired @@ -1846,41 +1813,8 @@ void CRepeaterHandler::link(RECONNECT reconnect, const std::string& reflector) //m_linkReconnect = reconnect; m_linkReconnectTimer.stop(); - - switch (reconnect) { - case RECONNECT_5MINS: - m_linkReconnectTimer.start(5U * 60U); - break; - case RECONNECT_10MINS: - m_linkReconnectTimer.start(10U * 60U); - break; - case RECONNECT_15MINS: - m_linkReconnectTimer.start(15U * 60U); - break; - case RECONNECT_20MINS: - m_linkReconnectTimer.start(20U * 60U); - break; - case RECONNECT_25MINS: - m_linkReconnectTimer.start(25U * 60U); - break; - case RECONNECT_30MINS: - m_linkReconnectTimer.start(30U * 60U); - break; - case RECONNECT_60MINS: - m_linkReconnectTimer.start(60U * 60U); - break; - case RECONNECT_90MINS: - m_linkReconnectTimer.start(90U * 60U); - break; - case RECONNECT_120MINS: - m_linkReconnectTimer.start(120U * 60U); - break; - case RECONNECT_180MINS: - m_linkReconnectTimer.start(180U * 60U); - break; - default: - break; - } + + setReconnectTimer(reconnect); // Nothing to do if ((m_linkStatus != LS_NONE && m_linkRepeater == reflector) || @@ -3085,6 +3019,24 @@ void CRepeaterHandler::readAPRSFrame(CAPRSFrame& frame) } } +void CRepeaterHandler::setReconnectTimer(RECONNECT reconnect) +{ + CLog::logDebug("Reconnect timer set to %s", reconnectToString(reconnect)); + switch (reconnect) { + case RECONNECT_5MINS: m_linkReconnectTimer.start( 5U * 60U); break; + case RECONNECT_10MINS: m_linkReconnectTimer.start(10U * 60U); break; + case RECONNECT_15MINS: m_linkReconnectTimer.start(15U * 60U); break; + case RECONNECT_20MINS: m_linkReconnectTimer.start(20U * 60U); break; + case RECONNECT_25MINS: m_linkReconnectTimer.start(25U * 60U); break; + case RECONNECT_30MINS: m_linkReconnectTimer.start(30U * 60U); break; + case RECONNECT_60MINS: m_linkReconnectTimer.start(60U * 60U); break; + case RECONNECT_90MINS: m_linkReconnectTimer.start(90U * 60U); break; + case RECONNECT_120MINS: m_linkReconnectTimer.start(120U * 60U); break; + case RECONNECT_180MINS: m_linkReconnectTimer.start(180U * 60U); break; + default: break; + } +} + #ifdef USE_CCS bool CRepeaterHandler::isCCSCommand(const std::string& command) const { diff --git a/Common/RepeaterHandler.h b/Common/RepeaterHandler.h index c5ed834..7587472 100644 --- a/Common/RepeaterHandler.h +++ b/Common/RepeaterHandler.h @@ -317,6 +317,8 @@ private: void triggerInfo(); + void setReconnectTimer(RECONNECT reconnect); + #ifdef USE_CCS bool isCCSCommand(const std::string& command) const; #endif From c6d47cc32940dd25a4d7b0909343b71bb81b56b7 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 16 Aug 2025 10:52:50 +0200 Subject: [PATCH 09/10] clean up #57 --- Common/RepeaterHandler.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index 380c0c8..b100cf1 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -1809,9 +1809,6 @@ void CRepeaterHandler::link(RECONNECT reconnect, const std::string& reflector) } #endif - //m_linkStartup = reflector; - //m_linkReconnect = reconnect; - m_linkReconnectTimer.stop(); setReconnectTimer(reconnect); From abe1b52d18d2e271eb77c4936270cd65bf2d642b Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 16 Aug 2025 11:41:43 +0200 Subject: [PATCH 10/10] fix potential acces violation --- Common/DCSProtocolHandlerPool.cpp | 5 +++-- Common/DExtraProtocolHandlerPool.cpp | 3 ++- Common/DPlusProtocolHandlerPool.cpp | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Common/DCSProtocolHandlerPool.cpp b/Common/DCSProtocolHandlerPool.cpp index fd10f0f..f8fdf7a 100644 --- a/Common/DCSProtocolHandlerPool.cpp +++ b/Common/DCSProtocolHandlerPool.cpp @@ -80,11 +80,12 @@ void CDCSProtocolHandlerPool::release(CDCSProtocolHandler *handler) assert(handler != NULL); for (auto it=m_pool.begin(); it!=m_pool.end(); it++) { if (it->second == handler) { + unsigned int port = handler->getPort(); m_pool.erase(it); handler->close(); delete handler ; - m_index = m_pool.end(); // since we removed an element, m_index is ouot of order, just move it back to the end - CLog::logInfo("Released DCS ProtocolHandler on port %u.\n", handler->getPort()); + m_index = m_pool.end(); // since we removed an element, m_index is out of order, just move it back to the end + CLog::logInfo("Released DCS ProtocolHandler on port %u.\n", port); return; } diff --git a/Common/DExtraProtocolHandlerPool.cpp b/Common/DExtraProtocolHandlerPool.cpp index c726259..3704850 100644 --- a/Common/DExtraProtocolHandlerPool.cpp +++ b/Common/DExtraProtocolHandlerPool.cpp @@ -80,11 +80,12 @@ void CDExtraProtocolHandlerPool::release(CDExtraProtocolHandler *handler) assert(handler != NULL); for (auto it=m_pool.begin(); it!=m_pool.end(); it++) { if (it->second == handler) { + unsigned int port = handler->getPort(); m_pool.erase(it); handler->close(); delete handler; m_index = m_pool.end(); // m_index might be out of order, reset it - CLog::logInfo("Releasing DExtra Protocol Handler on port %u.\n", handler->getPort()); + CLog::logInfo("Releasing DExtra Protocol Handler on port %u.\n", port); return; } diff --git a/Common/DPlusProtocolHandlerPool.cpp b/Common/DPlusProtocolHandlerPool.cpp index 1b62276..ed8d63a 100644 --- a/Common/DPlusProtocolHandlerPool.cpp +++ b/Common/DPlusProtocolHandlerPool.cpp @@ -81,11 +81,12 @@ void CDPlusProtocolHandlerPool::release(CDPlusProtocolHandler *handler) assert(handler != NULL); for (auto it=m_pool.begin(); it!=m_pool.end(); it++) { if (it->second == handler) { + unsigned int port = handler->getPort(); m_pool.erase(it); handler->close(); delete handler; m_index = m_pool.end(); // m_index might be ut of order so reset it - CLog::logInfo("Releasing DPlus ProtocolHandler on port %u.\n", handler->getPort()); + CLog::logInfo("Releasing DPlus ProtocolHandler on port %u.\n", port); return; } }