From: Jaikumar Ganesh <jaikumar@google.com>
To: linux-bluetooth@vger.kernel.org
Cc: Jaikumar Ganesh <jaikumar@google.com>
Subject: [PATCH] Fix setting of mode after discovery times out.
Date: Tue, 5 Apr 2011 17:44:52 -0700 [thread overview]
Message-ID: <1302050692-24497-1-git-send-email-jaikumar@google.com> (raw)
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.
---
src/adapter.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/adapter.c b/src/adapter.c
index c400bfd..014cc0c 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -156,6 +156,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)
@@ -374,7 +376,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;
}
--
1.7.3.1
next reply other threads:[~2011-04-06 0:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-06 0:44 Jaikumar Ganesh [this message]
2011-04-09 17:35 ` [PATCH] Fix setting of mode after discovery times out Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1302050692-24497-1-git-send-email-jaikumar@google.com \
--to=jaikumar@google.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).