summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-hci.c
diff options
context:
space:
mode:
Diffstat (limited to 'hcid/dbus-hci.c')
-rw-r--r--hcid/dbus-hci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c
index 40b7a886..69b4ab77 100644
--- a/hcid/dbus-hci.c
+++ b/hcid/dbus-hci.c
@@ -953,6 +953,9 @@ static void passkey_cb(struct agent *agent, DBusError *err, const char *passkey,
return;
}
+ str2ba(adapter->address, &sba);
+ str2ba(device->address, &dba);
+
if (err) {
if (device->created)
device_remove(connection, device);
@@ -963,9 +966,6 @@ static void passkey_cb(struct agent *agent, DBusError *err, const char *passkey,
device->created = FALSE;
- str2ba(adapter->address, &sba);
- str2ba(device->address, &dba);
-
len = strlen(passkey);
set_pin_length(&sba, len);