summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt Francomb <mfrancomb@aminocom.com>2010-10-26 21:08:35 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2010-10-26 21:11:37 +0200
commit0b3daa981d62a6a6831b5191ec8507c8749728ac (patch)
treef6c2b76f5854565515e19d93efc46fb39604464b /src
parent573c0c423865281a290a42de3525a1ae08d481e6 (diff)
downloadconnman-0b3daa981d62a6a6831b5191ec8507c8749728ac.tar.gz
connman-0b3daa981d62a6a6831b5191ec8507c8749728ac.tar.bz2
connman-0b3daa981d62a6a6831b5191ec8507c8749728ac.zip
device: Save zero scan_interval values
For some devices it makes sense to not run periodic wifi scans at all. Although the default value is kept at 300 seconds for wifi, one should be able to set that value to 0, and fetch it back after rebooting.
Diffstat (limited to 'src')
-rw-r--r--src/device.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/device.c b/src/device.c
index 1b721eef..f79e9919 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1656,7 +1656,7 @@ static int device_load(struct connman_device *device)
case CONNMAN_DEVICE_MODE_NETWORK_MULTIPLE:
val = g_key_file_get_integer(keyfile, identifier,
"ScanInterval", &error);
- if (error == NULL && val > 0)
+ if (error == NULL)
device->scan_interval = val;
g_clear_error(&error);
break;
@@ -1694,8 +1694,7 @@ static int device_save(struct connman_device *device)
break;
case CONNMAN_DEVICE_MODE_NETWORK_SINGLE:
case CONNMAN_DEVICE_MODE_NETWORK_MULTIPLE:
- if (device->scan_interval > 0)
- g_key_file_set_integer(keyfile, identifier,
+ g_key_file_set_integer(keyfile, identifier,
"ScanInterval", device->scan_interval);
break;
}