diff --git a/src/device.c b/src/device.c
index f7f8948..7b78084 100644
--- a/src/device.c
+++ b/src/device.c
device->db_id = gatt_db_register(device->db, gatt_service_added,
gatt_service_removed, device, NULL);
- device->refresh_discovery = true;
+ device->refresh_discovery = main_opts.refresh_discovery;
return btd_device_ref(device);
}
diff --git a/src/hcid.h b/src/hcid.h
index 5f249eb..3624ba6 100644
--- a/src/hcid.h
+++ b/src/hcid.h
gboolean name_resolv;
gboolean debug_keys;
gboolean fast_conn;
+ gboolean refresh_discovery;
uint16_t did_source;
uint16_t did_vendor;
diff --git a/src/main.c b/src/main.c
index 2c083de..b37c329 100644
--- a/src/main.c
+++ b/src/main.c
else
main_opts.fast_conn = boolean;
+ boolean = g_key_file_get_boolean(config, "General",
+ "RefreshDiscovery", &err);
+ if (err)
+ g_clear_error(&err);
+ else
+ main_opts.refresh_discovery = boolean;
+
str = g_key_file_get_string(config, "GATT", "Cache", &err);
if (err) {
DBG("%s", err->message);
main_opts.reverse_discovery = TRUE;
main_opts.name_resolv = TRUE;
main_opts.debug_keys = FALSE;
+ main_opts.refresh_discovery = TRUE;
main_opts.default_params.num_entries = 0;
main_opts.default_params.br_page_scan_type = 0xFFFF;
diff --git a/src/main.conf b/src/main.conf
index f41203b..42f7e41 100644
--- a/src/main.conf
+++ b/src/main.conf
# 0 = disable timer, i.e. never keep temporary devices
#TemporaryTimeout = 30
+# Enables the device to issue an SDP request to update known services when
+# profile is connected. Defaults to true.
+#RefreshDiscovery = true
+
[Controller]
# The following values are used to load default adapter parameters. BlueZ loads
# the values into the kernel before the adapter is powered if the kernel