Open Source Telephony
 help / color / mirror / Atom feed
From: =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau <frederic.dalleau@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH 2/2] hfp_ag: Do not close client fd on unref
Date: Thu, 17 Feb 2011 16:55:26 +0100	[thread overview]
Message-ID: <1297958126-9156-3-git-send-email-frederic.dalleau@linux.intel.com> (raw)
In-Reply-To: <1297958126-9156-1-git-send-email-frederic.dalleau@linux.intel.com>

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

---
 plugins/hfp_ag.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/plugins/hfp_ag.c b/plugins/hfp_ag.c
index cbf3ccd..cb4a0be 100644
--- a/plugins/hfp_ag.c
+++ b/plugins/hfp_ag.c
@@ -40,7 +40,6 @@
 static struct server *server;
 static guint modemwatch_id;
 static GList *modems;
-static guint channel_watch;
 
 static const gchar *hfp_ag_record =
 "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
@@ -86,12 +85,6 @@ static const gchar *hfp_ag_record =
 "  </attribute>\n"
 "</record>\n";
 
-static gboolean hfp_ag_disconnect_cb(GIOChannel *io, GIOCondition cond,
-							gpointer user_data)
-{
-	return FALSE;
-}
-
 static void hfp_ag_connect_cb(GIOChannel *io, GError *err, gpointer user_data)
 {
 	struct ofono_modem *modem;
@@ -118,8 +111,7 @@ static void hfp_ag_connect_cb(GIOChannel *io, GError *err, gpointer user_data)
 	fd = g_io_channel_unix_get_fd(io);
 	ofono_emulator_register(em, fd);
 
-	channel_watch = g_io_add_watch(io, G_IO_NVAL | G_IO_HUP | G_IO_ERR,
-					hfp_ag_disconnect_cb, NULL);
+	g_io_channel_set_close_on_unref(io, FALSE);
 
 	return;
 
-- 
1.7.1


  parent reply	other threads:[~2011-02-17 15:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17 15:55 [PATCH 0/2] Fix reference handling in hfp_ag =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-02-17 15:55 ` [PATCH 1/2] emulator: unref GIOChannel after creation =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-02-17 15:55 ` =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau [this message]
2011-02-17 16:08 ` [PATCH 0/2] Fix reference handling in hfp_ag 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=1297958126-9156-3-git-send-email-frederic.dalleau@linux.intel.com \
    --to=frederic.dalleau@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