All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guillaume Zajac <guillaume.zajac@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH_v6 2/5] ppp_net: add ppp_net_resume_interface() API
Date: Fri, 20 May 2011 11:38:13 +0200	[thread overview]
Message-ID: <1305884296-2601-3-git-send-email-guillaume.zajac@linux.intel.com> (raw)
In-Reply-To: <1305884296-2601-1-git-send-email-guillaume.zajac@linux.intel.com>

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

---
 gatchat/ppp.h     |    1 +
 gatchat/ppp_net.c |   10 ++++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/gatchat/ppp.h b/gatchat/ppp.h
index 22809d8..ae96e42 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 25bcfa4..39cfdfd 100644
--- a/gatchat/ppp_net.c
+++ b/gatchat/ppp_net.c
@@ -212,3 +212,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);
+}
-- 
1.7.1


  parent reply	other threads:[~2011-05-20  9:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-20  9:38 [PATCH_v6 0/5] Escape sequence and ATO0 implementation Guillaume Zajac
2011-05-20  9:38 ` [PATCH_v6 1/5] gathdlc: add g_at_hdlc_resume() API Guillaume Zajac
2011-05-25 10:39   ` Denis Kenzior
2011-05-20  9:38 ` Guillaume Zajac [this message]
2011-05-25 10:39   ` [PATCH_v6 2/5] ppp_net: add ppp_net_resume_interface() API Denis Kenzior
2011-05-20  9:38 ` [PATCH_v6 3/5] gatppp: add public suspend/resume APIs and suspended state Guillaume Zajac
2011-05-25 10:40   ` Denis Kenzior
2011-05-20  9:38 ` [PATCH_v6 4/5] emulator: add dun_ato_cb() definition and register it in GAtServer Guillaume Zajac
2011-05-25 10:43   ` Denis Kenzior
2011-05-20  9:38 ` [PATCH_v6 5/5] gsmdial: add escape sequence/ATH0/ATO0 testing option Guillaume Zajac
2011-05-25 10:43   ` 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=1305884296-2601-3-git-send-email-guillaume.zajac@linux.intel.com \
    --to=guillaume.zajac@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 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.