From: Neil Brown Date: Sat, 31 Jan 2009 19:51:28 +0000 (+1100) Subject: Remove watchdog source when resetting modem. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=21ac529cdedb0fbf476c1d5d656c221c58a28f91;p=gsm0710muxd.git Remove watchdog source when resetting modem. The "reset_modem" command eventual sets up the g_source_watchdog without ever stopping the old watchdog. So each call adds another watchdog. So remove the current watchdog when resetting Signed-off-by: NeilBrown --- diff --git a/src/gsm0710muxd.c b/src/gsm0710muxd.c index 6260d24..b11cc39 100644 --- a/src/gsm0710muxd.c +++ b/src/gsm0710muxd.c @@ -687,6 +687,7 @@ static gboolean c_reset_modem(const char* origin) { LOG(LOG_DEBUG, "Enter"); LOG(LOG_INFO, "modem reset"); + g_source_remove(serial.g_source_watchdog); serial.state = MUX_STATE_CLOSING; return TRUE; }