diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-04-28 17:24:36 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-04-28 17:27:36 -0500 |
commit | fb8ca665dd14b653c84eeaf8a57d7ea65fff87d3 (patch) | |
tree | de350b0d29702607fd6ff712f4330d73588606f9 /gatchat/gatppp.c | |
parent | 378f3c61e3540c737cd0d45c5c946ddcf40c471a (diff) | |
download | ofono-fb8ca665dd14b653c84eeaf8a57d7ea65fff87d3.tar.bz2 |
ppp: Re-add capability to detect io down events
Diffstat (limited to 'gatchat/gatppp.c')
-rw-r--r-- | gatchat/gatppp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c index 8bd50bce..461b54d9 100644 --- a/gatchat/gatppp.c +++ b/gatchat/gatppp.c @@ -264,6 +264,13 @@ void ppp_set_mtu(GAtPPP *ppp, const guint8 *data) ppp->mtu = mtu; } +static void io_disconnect(gpointer user_data) +{ + GAtPPP *ppp = user_data; + + pppcp_signal_down(ppp->lcp); +} + /* Administrative Open */ void g_at_ppp_open(GAtPPP *ppp) { @@ -397,6 +404,8 @@ GAtPPP *g_at_ppp_new(GIOChannel *modem) ppp->ipcp = ipcp_new(ppp); g_at_hdlc_set_receive(ppp->hdlc, ppp_receive, ppp); + g_at_io_set_disconnect_function(g_at_hdlc_get_io(ppp->hdlc), + io_disconnect, ppp); return ppp; } |