diff options
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/device.c b/src/device.c index 8c34c6048..27f0bf818 100644 --- a/src/device.c +++ b/src/device.c @@ -1950,14 +1950,22 @@ void device_bonding_complete(struct btd_device *device, uint8_t status) device_browse(device, bonding->conn, bonding->msg, NULL, FALSE); - } else if (!device->browse && !device->discov_timer && - main_opts.reverse_sdp) { - /* If we are not initiators and there is no currently active - * discovery or discovery timer, set the discovery timer */ - debug("setting timer for reverse service discovery"); - device->discov_timer = g_timeout_add_seconds(DISCOVERY_TIMER, - start_discovery, - device); + } else { + /* If not the initiator consider the device permanent otherwise + * wait to service discover to complete */ + device_set_temporary(device, FALSE); + + if (!device->browse && !device->discov_timer && + main_opts.reverse_sdp) { + /* If we are not initiators and there is no currently + * active discovery or discovery timer, set discovery + * timer */ + debug("setting timer for reverse service discovery"); + device->discov_timer = g_timeout_add_seconds( + DISCOVERY_TIMER, + start_discovery, + device); + } } device_set_paired(device, TRUE); |