From 2ed4044afd72c32e9e689d1f3ca953d4baff815e Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Wed, 16 Aug 2006 18:06:21 +0000 Subject: Missing ModeChanged signal on DEVDOWN --- hcid/dbus.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hcid/dbus.c b/hcid/dbus.c index 4706c76c..e60ef44f 100644 --- a/hcid/dbus.c +++ b/hcid/dbus.c @@ -397,7 +397,7 @@ static void reply_pending_requests(const char *path, const struct hci_dbus_data /* pending bonding */ if (pdata->bonding) error_authentication_canceled(connection, pdata->bonding->rq); - else if (pdata->requestor_name) { + else if (pdata->discover_state != STATE_IDLE) { /* pending inquiry */ /* Send discovery completed signal if there isn't name to resolve */ @@ -634,6 +634,8 @@ int hcid_dbus_stop_device(uint16_t id) { char path[MAX_PATH_LENGTH]; struct hci_dbus_data* pdata; + const char *scan_mode = MODE_OFF; + DBusMessage *message; snprintf(path, sizeof(path), "%s/hci%d", BASE_PATH, id); @@ -642,6 +644,12 @@ int hcid_dbus_stop_device(uint16_t id) return -1; } + message = dev_signal_factory(pdata->dev_id, "ModeChanged", + DBUS_TYPE_STRING, &scan_mode, + DBUS_TYPE_INVALID); + + send_reply_and_unref(connection, message); + /* cancel pending timeout */ if (pdata->timeout_id) { g_timeout_remove(pdata->timeout_id); -- cgit