summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorVinicius Gomes <vinicius.gomes@openbossa.org>2008-04-03 17:55:54 +0000
committerVinicius Gomes <vinicius.gomes@openbossa.org>2008-04-03 17:55:54 +0000
commitdeac38234c118208d6ab31dcb26040e2a154ad2b (patch)
tree0cdbcd06eb1ee7e4f958806c61b60940864d35ac /hcid
parent83735b4aa67748253b2e3df02847ffb86c131085 (diff)
hcid: fixing a segmentation fault, when the first pair failed.
Diffstat (limited to 'hcid')
-rw-r--r--hcid/dbus-hci.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c
index 72ea30a9..954a892b 100644
--- a/hcid/dbus-hci.c
+++ b/hcid/dbus-hci.c
@@ -1006,12 +1006,7 @@ int hcid_dbus_request_pin(int dev, bdaddr_t *sba, struct hci_conn_info *ci)
ba2str(&ci->bdaddr, addr);
- device = adapter_find_device(adapter, addr);
- if (!device) {
- device = device_create(connection, adapter, addr, NULL);
- device->created = TRUE;
- }
-
+ device = adapter_get_device(connection, adapter, addr);
if (!device)
return -ENODEV;