diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/adapter.c | 2 | ||||
-rw-r--r-- | src/device.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/adapter.c b/src/adapter.c index 0e68359f..9573efd5 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2947,7 +2947,7 @@ void adapter_set_state(struct btd_adapter *adapter, int state) if (state & PERIODIC_INQUIRY || state & STD_INQUIRY) discov_active = TRUE; else if (adapter->disc_sessions && main_opts.inqmode) - adapter->scheduler_id = g_timeout_add(main_opts.inqmode * 1000, + adapter->scheduler_id = g_timeout_add_seconds(main_opts.inqmode, (GSourceFunc) start_inquiry, adapter); if (!discov_active && adapter->found_devices) { diff --git a/src/device.c b/src/device.c index 4182cb98..64d5c08d 100644 --- a/src/device.c +++ b/src/device.c @@ -58,7 +58,7 @@ #define DEFAULT_XML_BUF_SIZE 1024 #define DISCONNECT_TIMER 2 -#define DISCOVERY_TIMER 2000 +#define DISCOVERY_TIMER 2 struct btd_driver_data { struct btd_device_driver *driver; @@ -1297,7 +1297,7 @@ int device_set_paired(DBusConnection *conn, struct btd_device *device, /* If we are not initiators and there is no currently active discovery * or discovery timer, set the discovery timer */ if (!device->discov_active && !device->discov_timer) - device->discov_timer = g_timeout_add(DISCOVERY_TIMER, + device->discov_timer = g_timeout_add_seconds(DISCOVERY_TIMER, start_discovery, device); |