Skip to contentSkip to conversation

ppp: transition to dead when lcp finished

PATCH In review Kristen Carlson Accardi 2 participants 2 messages May 10, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppp: transition to dead when lcp finished

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(-)
gatchat/gatppp.c +4 -1
index 70669b0..cb2fef9 100644
@@ -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);
Signature · 1 line
1.6.6.1
#1 lore raw

Hi Kristen,

Quoted 6 lines

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(-)

Patch has been applied, thanks.

Regards,
-Denis