summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/adapter.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/adapter.c b/src/adapter.c
index 35fc01ef..55ac92e5 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2813,14 +2813,8 @@ int adapter_stop(struct btd_adapter *adapter)
adapter->active_conn = NULL;
}
- powered = FALSE;
-
- emit_property_changed(connection, adapter->path, ADAPTER_INTERFACE,
- "Powered", DBUS_TYPE_BOOLEAN, &powered);
-
if (adapter->scan_mode == (SCAN_PAGE | SCAN_INQUIRY)) {
discoverable = FALSE;
-
emit_property_changed(connection, adapter->path,
ADAPTER_INTERFACE, "Discoverable",
DBUS_TYPE_BOOLEAN, &discoverable);
@@ -2833,6 +2827,10 @@ int adapter_stop(struct btd_adapter *adapter)
DBUS_TYPE_BOOLEAN, &pairable);
}
+ powered = FALSE;
+ emit_property_changed(connection, adapter->path, ADAPTER_INTERFACE,
+ "Powered", DBUS_TYPE_BOOLEAN, &powered);
+
adapter->up = 0;
adapter->scan_mode = SCAN_DISABLED;
adapter->mode = MODE_OFF;