summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2006-08-16 18:06:21 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2006-08-16 18:06:21 +0000
commit2ed4044afd72c32e9e689d1f3ca953d4baff815e (patch)
tree88fa3f1a494895c9c4df3a0dbd3ee319d1ecfcd6 /hcid
parent8e94301b28ff9f7f03e39337f35e20602cb5f453 (diff)
Missing ModeChanged signal on DEVDOWN
Diffstat (limited to 'hcid')
-rw-r--r--hcid/dbus.c10
1 files changed, 9 insertions, 1 deletions
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);