diff options
author | Archie Pusaka <apusaka@chromium.org> | 2020-08-18 15:34:10 +0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2020-08-18 16:50:45 -0700 |
commit | 8fe6fddd9bfb4798d68c6df674f9d5d33d45c3c0 (patch) | |
tree | 7303fe0c061d4ae622ac1bec0752f0d71d761614 /src/main.c | |
parent | ebfa306d97b5020bf5ae55ab3821facfaf1c053c (diff) | |
download | bluez-8fe6fddd9bfb4798d68c6df674f9d5d33d45c3c0.tar.gz |
main: add configurable refresh_discovery parameter
This is to configure the default behavior of issuing SDP query
to update the services upon profile connection.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index 2c083de67..b37c32948 100644 --- a/src/main.c +++ b/src/main.c @@ -627,6 +627,13 @@ static void parse_config(GKeyFile *config) 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); @@ -688,6 +695,7 @@ static void init_defaults(void) 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; |