projects
/
connman
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc12c78
)
Reset scan trigger when scanning was performed
author
Marcel Holtmann
<marcel@holtmann.org>
Wed, 21 Jan 2009 21:51:23 +0000
(22:51 +0100)
committer
Marcel Holtmann
<marcel@holtmann.org>
Wed, 21 Jan 2009 21:51:23 +0000
(22:51 +0100)
src/device.c
patch
|
blob
|
history
diff --git
a/src/device.c
b/src/device.c
index
69604dd
..
8427a2c
100644
(file)
--- a/
src/device.c
+++ b/
src/device.c
@@
-1253,6
+1253,17
@@
int connman_device_set_scanning(struct connman_device *device,
g_dbus_send_message(connection, signal);
if (scanning == TRUE) {
+ if (device->scan_timeout > 0) {
+ g_source_remove(device->scan_timeout);
+ device->scan_timeout = 0;
+ }
+
+ if (device->scan_interval > 0) {
+ guint interval = device->scan_interval;
+ device->scan_timeout = g_timeout_add_seconds(interval,
+ device_scan_trigger, device);
+ }
+
g_hash_table_foreach(device->networks,
mark_network_unavailable, NULL);
return 0;