]> git.neil.brown.name Git - gsm0710muxd.git/commitdiff
Remove watchdog source when resetting modem.
authorNeil Brown <neilb@suse.de>
Sat, 31 Jan 2009 19:51:28 +0000 (06:51 +1100)
committerNeil Brown <neilb@suse.de>
Sat, 31 Jan 2009 19:51:28 +0000 (06:51 +1100)
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 <neilb@suse.de>
src/gsm0710muxd.c

index 6260d24ad71fd83adde7f59d211a0fed0b497104..b11cc39548f8d0abf2f7d3e91002f1144f955007 100644 (file)
@@ -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;
 }