at_ps: Disable network interface on "+CGEV: NW DEACT" notification tizen_2.1 2.1b_release 2.2_release accepted/tizen_2.1/20130425.025053 submit/tizen_2.1/20130424.233359 submit/tizen_2.2/20130714.154321
authorGuillaume Zajac <guillaume.zajac@linux.intel.com>
Tue, 26 Mar 2013 09:02:02 +0000 (10:02 +0100)
committerGuillaume Zajac <guillaume.zajac@linux.intel.com>
Tue, 2 Apr 2013 09:54:44 +0000 (11:54 +0200)
Change-Id: I138d80fe6cd9f67e1ab349e581600d9cee0f2933

src/at_ps.c

index 7bc3094..8268188 100644 (file)
@@ -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);