summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-11-14 17:27:16 -0300
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-11-17 14:15:10 -0300
commit7ec871d37de442fd3731a0eef319851c61fb04cc (patch)
tree069d1732958ede55f6e1821f653f1c6039e22c9c /src
parent204180c7dc2e20b9b701275a3fefb52707720f54 (diff)
Make use of g_timeout_add_seconds whenever possible.
Diffstat (limited to 'src')
-rw-r--r--src/adapter.c2
-rw-r--r--src/device.c4
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);