gatppp: Do not call disconnect func if suspended
authorGuillaume Zajac <guillaume.zajac@linux.intel.com>
Fri, 20 May 2011 09:38:14 +0000 (11:38 +0200)
committerDenis Kenzior <denkenz@gmail.com>
Tue, 24 May 2011 17:25:07 +0000 (12:25 -0500)
gatchat/gatppp.c

index 2f97d55..135e98c 100644 (file)
@@ -583,8 +583,9 @@ void g_at_ppp_unref(GAtPPP *ppp)
        if (is_zero == FALSE)
                return;
 
-       g_at_io_set_disconnect_function(g_at_hdlc_get_io(ppp->hdlc),
-                                               NULL, NULL);
+       if (ppp->suspended == FALSE)
+               g_at_io_set_disconnect_function(g_at_hdlc_get_io(ppp->hdlc),
+                                                       NULL, NULL);
 
        if (ppp->net)
                ppp_net_free(ppp->net);