gsmdial: Unref ppp when we get disconnected

This commit is contained in:
Zhenhua Zhang 2010-06-12 13:50:48 +08:00 committed by Denis Kenzior
parent 199582f684
commit e2e17512e0
1 changed files with 5 additions and 0 deletions

View File

@ -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);