Diff between ed31ac59ecb6e4e15c350e44637c05d7ef58c019 and f4807c64e0fdfca2c546c13753257437a879c203

Changed Files

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

Full Patch

diff --git a/src/adapter.c b/src/adapter.c
index 12b6aeb..a4180b1 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2183,9 +2183,13 @@ void btd_adapter_start(struct btd_adapter *adapter)
 	adapter->up = TRUE;
 	adapter->discov_timeout = get_discoverable_timeout(address);
 	adapter->pairable_timeout = get_pairable_timeout(address);
-	adapter->mode = MODE_CONNECTABLE;
 	adapter->off_timer = 0;
 
+	if (adapter->scan_mode & SCAN_INQUIRY)
+		adapter->mode = MODE_DISCOVERABLE;
+	else
+		adapter->mode = MODE_CONNECTABLE;
+
 	powered = TRUE;
 	emit_property_changed(connection, adapter->path,
 					ADAPTER_INTERFACE, "Powered",