From 8fa09d608f25e8ab320c067ef0ea4b2f92a7f0fc Mon Sep 17 00:00:00 2001 From: Tobias Blomberg Date: Tue, 5 Nov 2019 20:57:39 +0100 Subject: [PATCH] ModuleEchoLink LINK_IDLE_TIMEOUT bugfix ModuleEchoLink bugfix: The LINK_IDLE_TIMEOUT did not work if the remote_timeout TCL function was changed to not play any sound. --- src/svxlink/ChangeLog | 3 +++ src/svxlink/modules/echolink/QsoImpl.cpp | 14 +++++++++----- src/versions | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/svxlink/ChangeLog b/src/svxlink/ChangeLog index ee172880..3ef38c72 100644 --- a/src/svxlink/ChangeLog +++ b/src/svxlink/ChangeLog @@ -23,6 +23,9 @@ * New signal level "detector": CONST +* ModuleEchoLink bugfix: The LINK_IDLE_TIMEOUT did not work if the + remote_timeout TCL function was changed to not play any sound. + 1.7.0 -- 01 Sep 2019 diff --git a/src/svxlink/modules/echolink/QsoImpl.cpp b/src/svxlink/modules/echolink/QsoImpl.cpp index ecbc74f8..ca58cf6d 100644 --- a/src/svxlink/modules/echolink/QsoImpl.cpp +++ b/src/svxlink/modules/echolink/QsoImpl.cpp @@ -9,7 +9,7 @@ EchoLink Qso. \verbatim A module (plugin) for the multi purpose tranciever frontend system. -Copyright (C) 2004-2014 Tobias Blomberg / SM0SVX +Copyright (C) 2004-2019 Tobias Blomberg / SM0SVX This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -552,17 +552,21 @@ void QsoImpl::idleTimeoutCheck(Timer *t) { idle_timer_cnt = 0; return; - } - + } + if (++idle_timer_cnt == idle_timeout) { - cout << remoteCallsign() << ": EchoLink connection idle timeout. " - "Disconnecting...\n"; + cout << remoteCallsign() + << ": EchoLink connection idle timeout. Disconnecting..." << endl; module->processEvent("link_inactivity_timeout"); disc_when_done = true; msg_handler->begin(); event_handler->processEvent(string(module->name()) + "::remote_timeout"); msg_handler->end(); + if (!msg_handler->isWritingMessage()) + { + disconnect(); + } } } /* idleTimeoutCheck */ diff --git a/src/versions b/src/versions index 33ab3bea..b06fafef 100644 --- a/src/versions +++ b/src/versions @@ -14,7 +14,7 @@ LIBASYNC=1.6.0.99.3 SVXLINK=1.7.99.19 MODULE_HELP=1.0.0 MODULE_PARROT=1.1.1 -MODULE_ECHO_LINK=1.5.0 +MODULE_ECHO_LINK=1.5.0.99.0 MODULE_TCL=1.0.1 MODULE_PROPAGATION_MONITOR=1.0.1 MODULE_TCL_VOICE_MAIL=1.0.2