From f124253b68d9ec5a7b1c81f6c30f725ca11832c1 Mon Sep 17 00:00:00 2001 From: Guillaume Zajac Date: Tue, 26 Mar 2013 10:02:02 +0100 Subject: [PATCH] at_ps: Disable network interface on "+CGEV: NW DEACT" notification Change-Id: I138d80fe6cd9f67e1ab349e581600d9cee0f2933 --- src/at_ps.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/at_ps.c b/src/at_ps.c index 7bc3094..8268188 100644 --- a/src/at_ps.c +++ b/src/at_ps.c @@ -103,7 +103,7 @@ static void on_response_set_pdp_context_deactivate(TcorePending *p, notify_context_status_changed(co_ps, cid, PS_DATA_CALL_NOT_CONNECTED); - if (tcore_hal_setup_netif(h, co_ps, NULL, ps_context, cid, + if (tcore_hal_setup_netif(h, co_ps, NULL, NULL, cid, FALSE) != TCORE_RETURN_SUCCESS) err("Failed to disable network interface"); @@ -398,6 +398,7 @@ static gboolean on_cgev_notification(CoreObject *co_ps, const void *data, const char *line = lines->data; char *noti_data; unsigned int cid; + TcoreHal *hal; dbg("Enter"); @@ -425,6 +426,11 @@ static gboolean on_cgev_notification(CoreObject *co_ps, const void *data, notify_context_status_changed(co_ps, cid, PS_DATA_CALL_NOT_CONNECTED); + hal = tcore_object_get_hal(co_ps); + if (tcore_hal_setup_netif(hal, co_ps, NULL, NULL, cid, + FALSE) != TCORE_RETURN_SUCCESS) + err("Failed to disable network interface"); + out: tcore_at_tok_free(tokens); -- 2.7.4