diff options
author | Jaikumar Ganesh <jaikumar@google.com> | 2011-04-04 13:18:53 -0700 |
---|---|---|
committer | Jaikumar Ganesh <jaikumar@google.com> | 2011-05-25 11:51:57 -0700 |
commit | 42aaf40b3ab87f07d3a3fc213780dceba4ec08e1 (patch) | |
tree | c7602f599dc15acd884559cb831935d894c847c2 | |
parent | f945a68fa973a13a0f57437e291258eb9f05dd7a (diff) | |
download | bluez-42aaf40b3ab87f07d3a3fc213780dceba4ec08e1.tar.gz |
Fix setting of mode after discovery times out.
When discovery times out, we were not setting the mode appropriately.
Thus, if the adapter is turned off and on, we will get the incorrect mode.
Also add a forward declaration for the introduced circular dependency.
-rw-r--r-- | src/adapter.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/adapter.c b/src/adapter.c index b3ba2820..ee52fd75 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -155,6 +155,8 @@ struct btd_adapter { static void adapter_set_pairable_timeout(struct btd_adapter *adapter, guint interval); +static DBusMessage *set_discoverable(DBusConnection *conn, DBusMessage *msg, + gboolean discoverable, void *data); static int found_device_cmp(const struct remote_dev_info *d1, const struct remote_dev_info *d2) @@ -396,7 +398,7 @@ static gboolean discov_timeout_handler(gpointer user_data) adapter->discov_timeout_id = 0; - adapter_ops->set_discoverable(adapter->dev_id, FALSE); + set_discoverable(NULL, NULL, FALSE, user_data); return FALSE; } |