All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ppp: alert ipcp when lcp is down
@ 2010-04-22 19:55 Kristen Carlson Accardi
  2010-04-22 20:12 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Kristen Carlson Accardi @ 2010-04-22 19:55 UTC (permalink / raw)
  To: ofono

[-- 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


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

end of thread, other threads:[~2010-04-22 20:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-22 19:55 [PATCH] ppp: alert ipcp when lcp is down Kristen Carlson Accardi
2010-04-22 20:12 ` Denis Kenzior

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.