From e2e17512e0666f322bc5f833e48f12b51fb0027e Mon Sep 17 00:00:00 2001 From: Zhenhua Zhang Date: Sat, 12 Jun 2010 13:50:48 +0800 Subject: gsmdial: Unref ppp when we get disconnected --- gatchat/gsmdial.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gatchat/gsmdial.c b/gatchat/gsmdial.c index a7d38c92..62c3b3d4 100644 --- a/gatchat/gsmdial.c +++ b/gatchat/gsmdial.c @@ -235,7 +235,12 @@ static void ppp_connect(const char *iface, const char *ip, static void ppp_disconnect(GAtPPPDisconnectReason reason, gpointer user_data) { char buf[64]; + g_print("PPP Link down: %d\n", reason); + + g_at_ppp_unref(ppp); + ppp = NULL; + g_at_chat_resume(modem); sprintf(buf, "AT+CFUN=%u", option_offmode); -- cgit v1.2.3