summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2012-02-22 23:55:03 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-22 23:56:18 +0200
commit07597ac33194760ae4ed178cdf354cafb844a471 (patch)
treef100974e9bdd61529a167ba8ec85e51cc1411b5c /plugins
parent39ce03ec74ab586975b6aaa2c4b8154e86ca60ad (diff)
downloadbluez-07597ac33194760ae4ed178cdf354cafb844a471.tar.gz
core: Fix initial adapter state
It's no longer guaranteed that an adapter start of in powered on state (e.g. not true with latest mgmt) so pass the correct state when registering an adapter.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/hciops.c2
-rw-r--r--plugins/mgmtops.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/plugins/hciops.c b/plugins/hciops.c
index 04802f486..00b90061c 100644
--- a/plugins/hciops.c
+++ b/plugins/hciops.c
@@ -656,7 +656,7 @@ static gboolean init_adapter(int index)
gboolean pairable, discoverable;
if (!dev->registered) {
- adapter = btd_manager_register_adapter(index);
+ adapter = btd_manager_register_adapter(index, TRUE);
if (adapter)
dev->registered = TRUE;
} else {
diff --git a/plugins/mgmtops.c b/plugins/mgmtops.c
index 147cf7c9f..fd42a6467 100644
--- a/plugins/mgmtops.c
+++ b/plugins/mgmtops.c
@@ -959,7 +959,8 @@ static void read_info_complete(int sk, uint16_t index, void *buf, size_t len)
DBG("hci%u name %s", index, (char *) rp->name);
DBG("hci%u short name %s", index, (char *) rp->short_name);
- adapter = btd_manager_register_adapter(index);
+ adapter = btd_manager_register_adapter(index,
+ mgmt_powered(info->current_settings));
if (adapter == NULL) {
error("mgmtops: unable to register adapter");
return;