Open Source Telephony
 help / color / mirror / Atom feed
From: Kristen Carlson Accardi <kristen@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH] ppp: alert ipcp when lcp is down
Date: Thu, 22 Apr 2010 12:55:02 -0700	[thread overview]
Message-ID: <1271966102-8857-1-git-send-email-kristen@linux.intel.com> (raw)

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

This cleanly shuts down the network interface
---
 gatchat/gatppp.c  |    5 +++++
 gatchat/ppp.h     |    1 +
 gatchat/ppp_lcp.c |    1 +
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c
index b7834e3..4f49404 100644
--- a/gatchat/gatppp.c
+++ b/gatchat/gatppp.c
@@ -429,6 +429,11 @@ void ppp_net_down_notify(GAtPPP *ppp)
 	ppp->net = NULL;
 }
 
+void ppp_lcp_down_notify(GAtPPP *ppp)
+{
+	pppcp_signal_down(ppp->ipcp);
+}
+
 void ppp_set_recv_accm(GAtPPP *ppp, guint32 accm)
 {
 	ppp->recv_accm = accm;
diff --git a/gatchat/ppp.h b/gatchat/ppp.h
index 07483a9..e60bd23 100644
--- a/gatchat/ppp.h
+++ b/gatchat/ppp.h
@@ -117,3 +117,4 @@ void ppp_net_down_notify(GAtPPP *ppp);
 void ppp_set_recv_accm(GAtPPP *ppp, guint32 accm);
 void ppp_set_xmit_accm(GAtPPP *ppp, guint32 accm);
 void ppp_set_mtu(GAtPPP *ppp, const guint8 *data);
+void ppp_lcp_down_notify(GAtPPP *ppp);
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c
index 8639c6c..5a9750d 100644
--- a/gatchat/ppp_lcp.c
+++ b/gatchat/ppp_lcp.c
@@ -114,6 +114,7 @@ static void lcp_down(struct pppcp_data *pppcp)
 
 	lcp_reset_config_options(lcp);
 	pppcp_set_local_options(pppcp, lcp->options, lcp->options_len);
+	ppp_lcp_down_notify(pppcp_get_ppp(pppcp));
 	ppp_enter_phase(pppcp_get_ppp(pppcp), PPP_PHASE_TERMINATION);
 }
 
-- 
1.6.6.1


             reply	other threads:[~2010-04-22 19:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-22 19:55 Kristen Carlson Accardi [this message]
2010-04-22 20:12 ` [PATCH] ppp: alert ipcp when lcp is down 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=1271966102-8857-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox