Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH] ppp: transition to dead when lcp finished
@ 2010-05-10 19:12 Kristen Carlson Accardi
  2010-05-10 20:30 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Kristen Carlson Accardi @ 2010-05-10 19:12 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 833 bytes --]

Transition to DEAD when lcp is finished and ignore any io
disconnects if we are already dead.
---
 gatchat/gatppp.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c
index 70669b0..cb2fef9 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);
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-10 20:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-10 19:12 [PATCH] ppp: transition to dead when lcp finished Kristen Carlson Accardi
2010-05-10 20:30 ` Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox