From: Kristen Carlson Accardi <kristen@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH] ppp: transition phase to DEAD when lcp finishes
Date: Mon, 03 May 2010 15:23:43 -0700 [thread overview]
Message-ID: <1272925423-3584-1-git-send-email-kristen@linux.intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 881 bytes --]
change the state to DEAD when lcp finishes. This prevents us from
calling our disconnect function again if we are already dead.
---
gatchat/gatppp.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c
index 70669b0..dd6d84d 100644
--- a/gatchat/gatppp.c
+++ b/gatchat/gatppp.c
@@ -186,9 +186,6 @@ static inline void ppp_enter_phase(GAtPPP *ppp, enum ppp_phase phase)
{
g_print("Entering new phase: %d\n", phase);
ppp->phase = phase;
-
- if (phase == PPP_PHASE_DEAD)
- ppp_dead(ppp);
}
void ppp_set_auth(GAtPPP *ppp, const guint8* auth_data)
@@ -290,6 +287,10 @@ void ppp_lcp_down_notify(GAtPPP *ppp)
void ppp_lcp_finished_notify(GAtPPP *ppp)
{
+ if (ppp->phase == PPP_PHASE_DEAD)
+ return;
+
+ ppp_enter_phase(ppp, PPP_PHASE_DEAD);
ppp_dead(ppp);
}
--
1.6.6.1
next reply other threads:[~2010-05-03 22:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-03 22:23 Kristen Carlson Accardi [this message]
2010-05-10 14:21 ` [PATCH] ppp: transition phase to DEAD when lcp finishes Denis Kenzior
2010-05-10 17:08 ` Kristen Carlson Accardi
2010-05-10 17:19 ` Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1272925423-3584-1-git-send-email-kristen@linux.intel.com \
--to=kristen@linux.intel.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.