From aec4a08e46ea9060c009ffcd89a05ed22b3b77cc Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Mon, 21 Aug 2017 13:21:43 +0100 Subject: [PATCH] Alter the relink timer strategy. --- DMRGateway.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/DMRGateway.cpp b/DMRGateway.cpp index 56625f1..692702d 100644 --- a/DMRGateway.cpp +++ b/DMRGateway.cpp @@ -372,7 +372,11 @@ int CDMRGateway::run() m_xlxReflector = m_xlxRoom; m_xlxConnected = true; - m_xlxRelink.stop(); + + if (m_xlxNumber == m_xlxStartup) + m_xlxRelink.stop(); + else + m_xlxRelink.start(); } else if (!connected && m_xlxConnected) { if (m_xlxReflector != 4000U) { LogMessage("XLX, Unlinking from XLX%03u due to loss of connection", m_xlxNumber); @@ -1133,10 +1137,6 @@ bool CDMRGateway::linkXLX(unsigned int number) m_xlxNumber = number; m_xlxRoom = reflector->m_startup; - // By definition the "Room" will be correct - if (m_xlxNumber != m_xlxStartup) - m_xlxRelink.start(); - LogMessage("XLX, Connecting to XLX%03u", m_xlxNumber); return true;