gsmdial: use g_at_chat_suspend

This commit is contained in:
Kristen Carlson Accardi 2010-05-10 11:39:41 -07:00 committed by Denis Kenzior
parent 2d8a1462db
commit cb36130b13
1 changed files with 4 additions and 4 deletions

View File

@ -235,6 +235,8 @@ static void ppp_connect(const char *iface, const char *ip,
static void ppp_disconnect(GAtPPPDisconnectReason reason, gpointer user_data)
{
g_print("PPP Link down: %d\n", reason);
g_at_chat_resume(control);
g_at_chat_resume(modem);
}
static void connect_cb(gboolean ok, GAtResult *result, gpointer user_data)
@ -253,10 +255,8 @@ static void connect_cb(gboolean ok, GAtResult *result, gpointer user_data)
* shutdown gatchat or else it tries to take all the input
* from the modem and does not let PPP get it.
*/
g_at_chat_unref(control);
control = NULL;
g_at_chat_unref(modem);
modem = NULL;
g_at_chat_suspend(control);
g_at_chat_suspend(modem);
/* open ppp */
ppp = g_at_ppp_new(channel);