summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-09-24 17:33:17 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-09-24 17:33:17 +0000
commit06729a5ffd58dac9d0573682b190384c1710ec89 (patch)
tree7ac22494d01ac4ea34928050e9737aca0616e8f6
parent9ec342ce2d928d2d58777cc7b9d3d0969fc3b208 (diff)
Remove bonding io channel watch when freeing related data
-rw-r--r--hcid/dbus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hcid/dbus.c b/hcid/dbus.c
index c4d1e453..bd09d10d 100644
--- a/hcid/dbus.c
+++ b/hcid/dbus.c
@@ -863,6 +863,8 @@ void hcid_dbus_bonding_process_complete(bdaddr_t *local, bdaddr_t *peer, uint8_t
name_listener_remove(connection, dbus_message_get_sender(pdata->bonding->rq),
(name_cb_t) create_bond_req_exit, pdata);
+ if (pdata->bonding->io_id)
+ g_io_remove_watch(pdata->bonding->io_id);
g_io_channel_close(pdata->bonding->io);
bonding_request_free(pdata->bonding);
pdata->bonding = NULL;
@@ -1626,6 +1628,8 @@ void hcid_dbus_disconn_complete(bdaddr_t *local, uint8_t status, uint16_t handle
name_listener_remove(connection, dbus_message_get_sender(pdata->bonding->rq),
(name_cb_t) create_bond_req_exit, pdata);
+ if (pdata->bonding->io_id)
+ g_io_remove_watch(pdata->bonding->io_id);
g_io_channel_close(pdata->bonding->io);
bonding_request_free(pdata->bonding);
pdata->bonding = NULL;