Diff between 0e7c24bb078b81714eb4225cba4c5747f6212075 and 348feb005a12b0c0db20e5276f5142fb8ff3bd3d

Changed Files

File Additions Deletions Status
src/adapter.c +7 -1 modified

Full Patch

diff --git a/src/adapter.c b/src/adapter.c
index f483cc8..cc0849f 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2880,12 +2880,18 @@ static void property_set_mode(struct btd_adapter *adapter, uint32_t setting,
 
 	dbus_message_iter_get_basic(value, &enable);
 
+	if (adapter->pending_settings & setting) {
+		g_dbus_pending_property_error(id, ERROR_INTERFACE ".Busy",
+						NULL);
+		return;
+	}
+
 	if (adapter->current_settings & setting)
 		current_enable = TRUE;
 	else
 		current_enable = FALSE;
 
-	if (enable == current_enable || adapter->pending_settings & setting) {
+	if (enable == current_enable) {
 		g_dbus_pending_property_success(id);
 		return;
 	}