diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-10-17 13:34:40 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-10-18 13:27:05 +0300 |
commit | 46a6d0a487578b2a73ee7cb621f18ffaa5369967 (patch) | |
tree | b5c23ec66ddeaa8d297fe2fa4db27f3a8e417c2e /src/main.c | |
parent | c2375b34644c9e16fd4b49599ae2f0796b1d5c58 (diff) | |
download | connman-46a6d0a487578b2a73ee7cb621f18ffaa5369967.tar.gz connman-46a6d0a487578b2a73ee7cb621f18ffaa5369967.tar.bz2 connman-46a6d0a487578b2a73ee7cb621f18ffaa5369967.zip |
main: Add SingleConnectedTechnology main.conf variable
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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; } |