From 309d97605a26e8c3dc843feb334c9529cf7ad0e8 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Thu, 13 Apr 2006 14:48:08 +0000 Subject: DiscoveryCompleted signal sent without discover request fixed. --- hcid/dbus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hcid') diff --git a/hcid/dbus.c b/hcid/dbus.c index 1143502f..3354da5f 100644 --- a/hcid/dbus.c +++ b/hcid/dbus.c @@ -1075,14 +1075,12 @@ void hcid_dbus_remote_name(bdaddr_t *local, bdaddr_t *peer, uint8_t status, char if (!disc_device_req_name(pdata)) goto failed; /* skip if a new request has been sent */ - pdata->discover_state = STATE_IDLE; - /* free discovered devices list */ slist_foreach(pdata->disc_devices, disc_device_info_free, NULL); slist_free(pdata->disc_devices); pdata->disc_devices = NULL; - if (pdata->discover_type == RESOLVE_NAMES) { + if (pdata->discover_state == STATE_RESOLVING_NAMES ) { message = dbus_message_new_signal(path, ADAPTER_INTERFACE, "DiscoveryCompleted"); @@ -1094,6 +1092,8 @@ void hcid_dbus_remote_name(bdaddr_t *local, bdaddr_t *peer, uint8_t status, char } } + pdata->discover_state = STATE_IDLE; + failed: bt_free(local_addr); bt_free(peer_addr); -- cgit