diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-23 16:57:37 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-23 16:57:37 +0200 |
commit | 384369fb18de79d6547954b8dd1d5b022ccb1e53 (patch) | |
tree | 7361026a4cee102dea0a8d9eb2af29f07f164130 /plugins | |
parent | 170259bb533c2c98ff9a711bbc3db474df0482f2 (diff) | |
download | bluez-384369fb18de79d6547954b8dd1d5b022ccb1e53.tar.gz bluez-384369fb18de79d6547954b8dd1d5b022ccb1e53.tar.xz bluez-384369fb18de79d6547954b8dd1d5b022ccb1e53.zip |
mgmtops: Fix connection list fetching when powered off
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mgmtops.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/mgmtops.c b/plugins/mgmtops.c index 139b058b..4a7bfff5 100644 --- a/plugins/mgmtops.c +++ b/plugins/mgmtops.c @@ -909,8 +909,8 @@ static void read_index_list_complete(int sk, void *buf, size_t len) index = btohs(bt_get_unaligned(&rp->index[i])); add_controller(index); - get_connections(sk, index); clear_uuids(index); + read_info(sk, index); } } @@ -972,9 +972,10 @@ static void read_info_complete(int sk, uint16_t index, void *buf, size_t len) return; } - if (mgmt_powered(info->current_settings)) + if (mgmt_powered(info->current_settings)) { mgmt_update_powered(adapter, info->current_settings); - else + get_connections(sk, index); + } else mgmt_set_powered(index, TRUE); adapter_name_changed(adapter, (char *) rp->name); @@ -1070,8 +1071,6 @@ static void get_connections_complete(int sk, uint16_t index, void *buf, bdaddr_t *bdaddr = g_memdup(&rp->addr[i], sizeof(bdaddr_t)); info->connections = g_slist_append(info->connections, bdaddr); } - - read_info(sk, index); } static void set_local_name_complete(int sk, uint16_t index, void *buf, |