summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2012-10-17 10:34:40 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-10-18 10:27:05 (GMT)
commit46a6d0a487578b2a73ee7cb621f18ffaa5369967 (patch)
treeb5c23ec66ddeaa8d297fe2fa4db27f3a8e417c2e
parentc2375b34644c9e16fd4b49599ae2f0796b1d5c58 (diff)
downloadconnman-46a6d0a487578b2a73ee7cb621f18ffaa5369967.zip
connman-46a6d0a487578b2a73ee7cb621f18ffaa5369967.tar.gz
connman-46a6d0a487578b2a73ee7cb621f18ffaa5369967.tar.bz2
main: Add SingleConnectedTechnology main.conf variable
-rw-r--r--src/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index d14cee6..187104b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -68,6 +68,7 @@ static struct {
unsigned int timeout_browserlaunch;
char **blacklisted_interfaces;
connman_bool_t allow_hostname_updates;
+ connman_bool_t single_tech;
} connman_settings = {
.bg_scan = TRUE,
.pref_timeservers = NULL,
@@ -78,6 +79,7 @@ static struct {
.timeout_browserlaunch = DEFAULT_BROWSER_LAUNCH_TIMEOUT,
.blacklisted_interfaces = NULL,
.allow_hostname_updates = TRUE,
+ .single_tech = FALSE,
};
static GKeyFile *load_config(const char *file)
@@ -253,6 +255,13 @@ static void parse_config(GKeyFile *config)
connman_settings.allow_hostname_updates = boolean;
g_clear_error(&error);
+
+ boolean = g_key_file_get_boolean(config, "General",
+ "SingleConnectedTechnology", &error);
+ if (error == NULL)
+ connman_settings.single_tech = boolean;
+
+ g_clear_error(&error);
}
static int config_init(const char *file)
@@ -420,6 +429,9 @@ connman_bool_t connman_setting_get_bool(const char *key)
if (g_str_equal(key, "AllowHostnameUpdates") == TRUE)
return connman_settings.allow_hostname_updates;
+ if (g_str_equal(key, "SingleConnectedTechnology") == TRUE)
+ return connman_settings.single_tech;
+
return FALSE;
}