* [PATCH 0/2] Fix reference handling in hfp_ag
@ 2011-02-17 15:55 =?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
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau @ 2011-02-17 15:55 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 488 bytes --]
Hi, these patch fixes reference handling in hfp_ag.
First patch makes sure that GATServer properly disconnects client
when modem is put offline.
Second patch fixes a Glib warning about a socket closed twice.
dun_gw may need something similar.
Frédéric Dalleau (2):
emulator: unref GIOChannel after creation
hfp_ag: Do not close client fd on unref
plugins/hfp_ag.c | 9 +--------
src/emulator.c | 2 ++
2 files changed, 3 insertions(+), 8 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] emulator: unref GIOChannel after creation
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 ` =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-02-17 15:55 ` [PATCH 2/2] hfp_ag: Do not close client fd on unref =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-02-17 16:08 ` [PATCH 0/2] Fix reference handling in hfp_ag Denis Kenzior
2 siblings, 0 replies; 4+ messages in thread
From: =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau @ 2011-02-17 15:55 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 524 bytes --]
---
src/emulator.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/emulator.c b/src/emulator.c
index 567692d..5744903 100644
--- a/src/emulator.c
+++ b/src/emulator.c
@@ -75,6 +75,8 @@ void ofono_emulator_register(struct ofono_emulator *em, int fd)
if (em->server == NULL)
return;
+ g_io_channel_unref(io);
+
g_at_server_set_debug(em->server, emulator_debug, "Server");
g_at_server_set_disconnect_function(em->server,
emulator_disconnect, em);
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] hfp_ag: Do not close client fd on unref
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
2011-02-17 16:08 ` [PATCH 0/2] Fix reference handling in hfp_ag Denis Kenzior
2 siblings, 0 replies; 4+ messages in thread
From: =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau @ 2011-02-17 15:55 UTC (permalink / raw)
To: ofono
[-- 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] Fix reference handling in hfp_ag
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 ` [PATCH 2/2] hfp_ag: Do not close client fd on unref =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
@ 2011-02-17 16:08 ` Denis Kenzior
2 siblings, 0 replies; 4+ messages in thread
From: Denis Kenzior @ 2011-02-17 16:08 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 652 bytes --]
Hi Frédéric,
On 02/17/2011 09:55 AM, Frédéric Dalleau wrote:
> Hi, these patch fixes reference handling in hfp_ag.
>
> First patch makes sure that GATServer properly disconnects client
> when modem is put offline.
>
> Second patch fixes a Glib warning about a socket closed twice.
> dun_gw may need something similar.
>
> Frédéric Dalleau (2):
> emulator: unref GIOChannel after creation
> hfp_ag: Do not close client fd on unref
>
> plugins/hfp_ag.c | 9 +--------
> src/emulator.c | 2 ++
> 2 files changed, 3 insertions(+), 8 deletions(-)
>
Both patches have been applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-02-17 16:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/2] hfp_ag: Do not close client fd on unref =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-02-17 16:08 ` [PATCH 0/2] Fix reference handling in hfp_ag 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.