summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-hci.c
diff options
context:
space:
mode:
authorVinicius Gomes <vinicius.gomes@openbossa.org>2008-04-14 21:10:27 +0000
committerVinicius Gomes <vinicius.gomes@openbossa.org>2008-04-14 21:10:27 +0000
commitfb306e968c0fc7a621df09c2c544db895d0b3419 (patch)
tree576f271ed9ac0e3661987d2b7147ba218a3a8659 /hcid/dbus-hci.c
parentcddee8f1044440a24f2c2ea98ebf529dc3db7de0 (diff)
hcid: removing device object when some error occurs during bonding process
Diffstat (limited to 'hcid/dbus-hci.c')
-rw-r--r--hcid/dbus-hci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c
index 36c9a9bd..f7233285 100644
--- a/hcid/dbus-hci.c
+++ b/hcid/dbus-hci.c
@@ -333,6 +333,9 @@ static void reply_pending_requests(const char *path, struct adapter *adapter)
/* pending bonding */
if (adapter->bonding) {
error_authentication_canceled(connection, adapter->bonding->msg);
+
+ remove_pending_device(adapter);
+
name_listener_remove(connection,
dbus_message_get_sender(adapter->bonding->msg),
(name_cb_t) create_bond_req_exit,
@@ -2435,6 +2438,8 @@ void create_bond_req_exit(const char *name, struct adapter *adapter)
g_free(p);
}
+ remove_pending_device(adapter);
+
g_io_channel_close(adapter->bonding->io);
if (adapter->bonding->io_id)
g_source_remove(adapter->bonding->io_id);