OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d32b5ac
)
Remove watch properly when doing bt_cancel_discovery.
author
Luiz Augusto von Dentz
<luiz.dentz@openbossa.org>
Wed, 6 May 2009 12:21:45 +0000
(09:21 -0300)
committer
Johan Hedberg
<johan.hedberg@nokia.com>
Wed, 6 May 2009 14:57:57 +0000
(17:57 +0300)
Any watch listen on sdp socket should be removed since the user_data is
most likely to be freed and no callback should be called after it.
common/glib-helper.c
patch
|
blob
|
history
diff --git
a/common/glib-helper.c
b/common/glib-helper.c
index
bdee098
..
c06b32c
100644
(file)
--- a/
common/glib-helper.c
+++ b/
common/glib-helper.c
@@
-283,8
+283,9
@@
static gboolean connect_watch(GIOChannel *chan, GIOCondition cond, gpointer user
sdp_list_free(search, NULL);
/* Set callback responsible for update the internal SDP transaction */
- g_io_add_watch(chan, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL,
- search_process_cb, ctxt);
+ ctxt->io_id = g_io_add_watch(chan,
+ G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL,
+ search_process_cb, ctxt);
return FALSE;
failed: