summaryrefslogtreecommitdiffstats
path: root/gatchat
diff options
context:
space:
mode:
authorGuillaume Zajac <guillaume.zajac@linux.intel.com>2011-05-20 11:38:13 +0200
committerDenis Kenzior <denkenz@gmail.com>2011-05-24 12:25:07 -0500
commit47f5887c2977a0456cf993a356c93016b528b49f (patch)
treefc800309ef051a9347c326ce71adbb129606f3e7 /gatchat
parent6f6a9747f84804cf4076a68112b83ea7edc37222 (diff)
downloadofono-47f5887c2977a0456cf993a356c93016b528b49f.tar.bz2
ppp_net: add ppp_net_resume_interface() API
Diffstat (limited to 'gatchat')
-rw-r--r--gatchat/ppp.h1
-rw-r--r--gatchat/ppp_net.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/gatchat/ppp.h b/gatchat/ppp.h
index f8669446..023d779a 100644
--- a/gatchat/ppp.h
+++ b/gatchat/ppp.h
@@ -108,6 +108,7 @@ void ppp_net_process_packet(struct ppp_net *net, const guint8 *packet);
void ppp_net_free(struct ppp_net *net);
gboolean ppp_net_set_mtu(struct ppp_net *net, guint16 mtu);
void ppp_net_suspend_interface(struct ppp_net *net);
+void ppp_net_resume_interface(struct ppp_net *net);
/* PPP functions related to main GAtPPP object */
void ppp_debug(GAtPPP *ppp, const char *str);
diff --git a/gatchat/ppp_net.c b/gatchat/ppp_net.c
index 805ab59f..1c81de07 100644
--- a/gatchat/ppp_net.c
+++ b/gatchat/ppp_net.c
@@ -222,3 +222,13 @@ void ppp_net_suspend_interface(struct ppp_net *net)
g_source_remove(net->watch);
net->watch = 0;
}
+
+void ppp_net_resume_interface(struct ppp_net *net)
+{
+ if (net == NULL || net->channel == NULL)
+ return;
+
+ net->watch = g_io_add_watch(net->channel,
+ G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL,
+ ppp_net_callback, net);
+}