summaryrefslogtreecommitdiffstats
path: root/gatchat/gatppp.c
diff options
context:
space:
mode:
authorKristen Carlson Accardi <kristen@linux.intel.com>2010-05-10 12:12:45 -0700
committerDenis Kenzior <denkenz@gmail.com>2010-05-10 15:29:44 -0500
commit2d8a1462dbb1f760452e7416ccd8793109572d2b (patch)
treebbaeb0c70b71e1c80dacfa8b78735e0d3e96350f /gatchat/gatppp.c
parent018ee10f92a48ac278b4219c1cf51876155fd5da (diff)
downloadofono-2d8a1462dbb1f760452e7416ccd8793109572d2b.tar.bz2
ppp: transition to dead when lcp finished
Transition to DEAD when lcp is finished and ignore any io disconnects if we are already dead.
Diffstat (limited to 'gatchat/gatppp.c')
-rw-r--r--gatchat/gatppp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c
index 70669b04..cb2fef98 100644
--- a/gatchat/gatppp.c
+++ b/gatchat/gatppp.c
@@ -290,7 +290,7 @@ void ppp_lcp_down_notify(GAtPPP *ppp)
void ppp_lcp_finished_notify(GAtPPP *ppp)
{
- ppp_dead(ppp);
+ ppp_enter_phase(ppp, PPP_PHASE_DEAD);
}
void ppp_set_recv_accm(GAtPPP *ppp, guint32 accm)
@@ -318,6 +318,9 @@ static void io_disconnect(gpointer user_data)
{
GAtPPP *ppp = user_data;
+ if (ppp->phase == PPP_PHASE_DEAD)
+ return;
+
ppp->disconnect_reason = G_AT_PPP_REASON_LINK_DEAD;
pppcp_signal_down(ppp->lcp);
pppcp_signal_close(ppp->lcp);