diff options
-rw-r--r-- | hcid/dbus.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hcid/dbus.c b/hcid/dbus.c index ca419ca3..9c11ab09 100644 --- a/hcid/dbus.c +++ b/hcid/dbus.c @@ -1165,6 +1165,14 @@ void hcid_dbus_periodic_inquiry_exit(bdaddr_t *local, uint8_t status) "PeriodicDiscoveryStopped"); send_reply_and_unref(connection, message); + /* workaround: inquiry completed is not sent when exiting from periodic inquiry */ + if (pdata->disc_active) { + message = dbus_message_new_signal(path, ADAPTER_INTERFACE, + "DiscoveryCompleted"); + send_reply_and_unref(connection, message); + + pdata->disc_active = 0; + } done: bt_free(local_addr); } |