Diff between 09e5d3243294002f28eb69f66e5dfded08c99efa and 1ec50ced231197df4a54f6928703543c0f6f9c28

Changed Files

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

Full Patch

diff --git a/src/adapter.c b/src/adapter.c
index 7cab860..85036c4 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -6970,9 +6970,6 @@ static void read_info_complete(uint8_t status, uint16_t length,
 	missing_settings = adapter->current_settings ^
 						adapter->supported_settings;
 
-	if (missing_settings & MGMT_SETTING_SECURE_CONN)
-		set_mode(adapter, MGMT_OP_SET_SECURE_CONN, 0x01);
-
 	switch (main_opts.mode) {
 	case BT_MODE_DUAL:
 		if (missing_settings & MGMT_SETTING_SSP)
@@ -7008,6 +7005,9 @@ static void read_info_complete(uint8_t status, uint16_t length,
 		break;
 	}
 
+	if (missing_settings & MGMT_SETTING_SECURE_CONN)
+		set_mode(adapter, MGMT_OP_SET_SECURE_CONN, 0x01);
+
 	err = adapter_register(adapter);
 	if (err < 0) {
 		error("Unable to register new adapter");