aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2012-02-24 01:42:53 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-24 01:42:53 +0200
commitffa77b08c6c901414ddc577ac64e91ce5035ebee (patch)
tree82c6eda6f162091d07e7c55a85ca1cb3e14b50b2
parentd66c5fa44c8f80e5c77d54474ab9cf12c43f0de8 (diff)
downloadbluez-ffa77b08c6c901414ddc577ac64e91ce5035ebee.tar.gz
bluez-ffa77b08c6c901414ddc577ac64e91ce5035ebee.tar.xz
bluez-ffa77b08c6c901414ddc577ac64e91ce5035ebee.zip
mgmtops: Fix calling adapter_mode_changed when not powered
-rw-r--r--plugins/mgmtops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mgmtops.c b/plugins/mgmtops.c
index a2c0f814..73f12c26 100644
--- a/plugins/mgmtops.c
+++ b/plugins/mgmtops.c
@@ -389,7 +389,7 @@ static void mgmt_new_settings(int sk, uint16_t index, void *buf, size_t len)
if (new_power != old_power)
mgmt_update_powered(adapter, settings);
- else if (mode_changed(settings, info->current_settings))
+ else if (new_power && mode_changed(settings, info->current_settings))
adapter_mode_changed(adapter, create_mode(settings));
old_pairable = mgmt_pairable(info->current_settings);