diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2006-09-15 15:29:27 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2006-09-15 15:29:27 +0000 |
commit | 675a0e69398d038ac64ff9e466f48ceda1fb6da9 (patch) | |
tree | 1fca8aece1f116f74e55e394635cc4aa824c6cb1 /hcid | |
parent | eb3def6c7256c40876d9dc023feb40f47f37caf7 (diff) |
Close the L2CAP raw socket only after the PIN request has been replied to
Diffstat (limited to 'hcid')
-rw-r--r-- | hcid/dbus-adapter.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c index 907b81db..80da4ef8 100644 --- a/hcid/dbus-adapter.c +++ b/hcid/dbus-adapter.c @@ -1951,8 +1951,6 @@ static DBusHandlerResult handle_dev_cancel_bonding_req(DBusConnection *conn, DBu dbus_data->bonding->cancel = 1; - g_io_channel_close(dbus_data->bonding->io); - l = slist_find(dbus_data->pin_reqs, &peer_bdaddr, pin_req_cmp); if (l) { struct pending_pin_info *pin_req = l->data; @@ -1963,6 +1961,7 @@ static DBusHandlerResult handle_dev_cancel_bonding_req(DBusConnection *conn, DBu * was already replied it doesn't make sense cancel the * remote passkey: return not authorized. */ + g_io_channel_close(dbus_data->bonding->io); return error_not_authorized(conn, msg); } else { int dd = hci_open_dev(dbus_data->dev_id); @@ -1981,6 +1980,8 @@ static DBusHandlerResult handle_dev_cancel_bonding_req(DBusConnection *conn, DBu free(pin_req); } + g_io_channel_close(dbus_data->bonding->io); + reply = dbus_message_new_method_return(msg); send_reply_and_unref(conn, reply); |