From 9ee9845b1ebbb29a7540eb5adb6ee03cbe030b2d Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 1 Mar 2013 18:21:19 +0100 Subject: iface-modem-3gpp: avoid re-setting deferred registration update while disabling Don't clear the current deferred registration update until having disabled and cleaned up unsolicited registrations state messages, or we may end up re-setting the deferred registration update again meanwhile --- src/mm-iface-modem-3gpp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c index 1d3fdce49..6c8bb1477 100644 --- a/src/mm-iface-modem-3gpp.c +++ b/src/mm-iface-modem-3gpp.c @@ -1347,6 +1347,7 @@ typedef enum { DISABLING_STEP_PERIODIC_REGISTRATION_CHECKS, DISABLING_STEP_DISABLE_UNSOLICITED_REGISTRATION_EVENTS, DISABLING_STEP_CLEANUP_UNSOLICITED_REGISTRATION_EVENTS, + DISABLING_STEP_CLEANUP_DEFERRED_REGISTRATION_UPDATE, DISABLING_STEP_CLEANUP_UNSOLICITED_EVENTS, DISABLING_STEP_DISABLE_UNSOLICITED_EVENTS, DISABLING_STEP_REGISTRATION_STATE, @@ -1419,8 +1420,6 @@ interface_disabling_step (DisablingContext *ctx) case DISABLING_STEP_PERIODIC_REGISTRATION_CHECKS: /* Disable periodic registration checks, if they were set */ periodic_registration_check_disable (ctx->self); - /* Prevent any deferred registration state update from happening after the modem is disabled */ - clear_deferred_registration_state_update (ctx->self); /* Fall down to next step */ ctx->step++; @@ -1462,6 +1461,12 @@ interface_disabling_step (DisablingContext *ctx) /* Fall down to next step */ ctx->step++; + case DISABLING_STEP_CLEANUP_DEFERRED_REGISTRATION_UPDATE: + /* Prevent any deferred registration state update from happening after the modem is disabled */ + clear_deferred_registration_state_update (ctx->self); + /* Fall down to next step */ + ctx->step++; + case DISABLING_STEP_CLEANUP_UNSOLICITED_EVENTS: if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->cleanup_unsolicited_events && MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->cleanup_unsolicited_events_finish) { -- cgit v1.2.1