diff options
-rw-r--r-- | drivers/ifxmodem/gprs-context.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/ifxmodem/gprs-context.c b/drivers/ifxmodem/gprs-context.c index 94c4030b..17a40528 100644 --- a/drivers/ifxmodem/gprs-context.c +++ b/drivers/ifxmodem/gprs-context.c @@ -387,14 +387,18 @@ static void cgev_notify(GAtResult *result, gpointer user_data) return; if (gcd->state != STATE_IDLE && gcd->rawip) { + g_at_rawip_shutdown(gcd->rawip); + g_at_rawip_unref(gcd->rawip); gcd->rawip = NULL; + } - gcd->active_context = 0; - gcd->state = STATE_IDLE; + ofono_gprs_context_deactivated(gc, gcd->active_context); - g_at_chat_resume(gcd->chat); - } + gcd->active_context = 0; + gcd->state = STATE_IDLE; + + g_at_chat_resume(gcd->chat); } static int ifx_gprs_context_probe(struct ofono_gprs_context *gc, |