From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] ppp: transition phase to DEAD when lcp finishes
Date: Mon, 10 May 2010 09:21:37 -0500 [thread overview]
Message-ID: <201005100921.38197.denkenz@gmail.com> (raw)
In-Reply-To: <1272925423-3584-1-git-send-email-kristen@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]
Hi Kristen,
> change the state to DEAD when lcp finishes. This prevents us from
> calling our disconnect function again if we are already dead.
I'm curious under what circumstances tlf gets called on LCP when we're already
down?
> ---
> 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;
I prefer we move this to ppp_enter_phase
> +
> + ppp_enter_phase(ppp, PPP_PHASE_DEAD);
Keep this
> ppp_dead(ppp);
And remove this.
Regards,
-Denis
next prev parent reply other threads:[~2010-05-10 14:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-03 22:23 [PATCH] ppp: transition phase to DEAD when lcp finishes Kristen Carlson Accardi
2010-05-10 14:21 ` Denis Kenzior [this message]
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=201005100921.38197.denkenz@gmail.com \
--to=denkenz@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox