summaryrefslogtreecommitdiffstats
path: root/src/device.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-01-13 17:29:53 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-01-13 17:29:53 +0200
commitbcb6af7fc78234948ba1c997825c8859464b170b (patch)
tree319c58e814e656ddf7336b6404e1f90103acaf96 /src/device.c
parent42e279efa41a0db453d9bc5405f3d713bd9937f2 (diff)
Don't do reverse SDP for renewed link keys
Add a flag for a renewed link key to the device struct so that when we get authentication complete we don't do reverse SDP or PropertyChanged(Paired, true) if a new bonding isn't being created.
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;