summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
authorArchie Pusaka <apusaka@chromium.org>2021-11-25 15:06:26 +0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-11-29 09:43:42 -0800
commit68e1c426cbc4c4f96fc1a074ad88ca56d8a0a3b0 (patch)
tree7877f5fcd116f83332f9c59514d1b18db74b098c /src/device.c
parentee004ee7bd8f3d4e10ee4e3eadacbaca4b3b0936 (diff)
downloadbluez-68e1c426cbc4c4f96fc1a074ad88ca56d8a0a3b0.tar.gz
main: add configurable RemoteNameRequestRetryDelay parameter
This specifies how long will the userspace ignore a peer with an unknown name after a failed remote name resolving procedure. The peer device can still be connected, this only prevents the remote name resolving procedure retry. Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/device.c b/src/device.c
index 44450b113..0e2612825 100644
--- a/src/device.c
+++ b/src/device.c
@@ -79,8 +79,6 @@
#define GATT_INCLUDE_UUID_STR "2802"
#define GATT_CHARAC_UUID_STR "2803"
-#define NAME_RESOLVE_RETRY_DELAY 300 /* seconds */
-
static DBusConnection *dbus_conn = NULL;
static unsigned service_state_cb_id;
@@ -4489,7 +4487,7 @@ bool device_is_name_resolve_allowed(struct btd_device *device)
*/
return now.tv_sec < device->name_resolve_failed_time ||
now.tv_sec >= device->name_resolve_failed_time +
- NAME_RESOLVE_RETRY_DELAY;
+ btd_opts.name_request_retry_delay;
}
void device_name_resolve_fail(struct btd_device *device)