summaryrefslogtreecommitdiffstats
path: root/src/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/device.c b/src/device.c
index b6d8695f..ba705288 100644
--- a/src/device.c
+++ b/src/device.c
@@ -110,6 +110,8 @@ struct btd_device {
gboolean secmode3;
sdp_list_t *tmp_records;
+
+ gboolean renewed_key;
};
struct browse_req {
@@ -1814,6 +1816,12 @@ void device_bonding_complete(struct btd_device *device, uint8_t status)
device->temporary = FALSE;
+ g_free(device->authr);
+ device->authr = NULL;
+
+ if (device->renewed_key)
+ return;
+
/* If we were initiators start service discovery immediately.
* However if the other end was the initator wait a few seconds
* before SDP. This is due to potential IOP issues if the other
@@ -1838,8 +1846,6 @@ void device_bonding_complete(struct btd_device *device, uint8_t status)
device_set_paired(device, TRUE);
- g_free(device->authr);
- device->authr = NULL;
bonding_request_free(bonding);
return;
@@ -2040,6 +2046,11 @@ gboolean device_is_authenticating(struct btd_device *device)
return (device->authr != NULL);
}
+void device_set_renewed_key(struct btd_device *device, gboolean renewed)
+{
+ device->renewed_key = renewed;
+}
+
void btd_device_add_uuid(struct btd_device *device, const char *uuid)
{
GSList *uuid_list;