summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 1e4809f6..62e5c54d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -67,6 +67,7 @@ static struct {
unsigned int timeout_inputreq;
unsigned int timeout_browserlaunch;
char **blacklisted_interfaces;
+ connman_bool_t allow_hostname_updates;
} connman_settings = {
.bg_scan = TRUE,
.pref_timeservers = NULL,
@@ -76,6 +77,7 @@ static struct {
.timeout_inputreq = DEFAULT_INPUT_REQUEST_TIMEOUT,
.timeout_browserlaunch = DEFAULT_BROWSER_LAUNCH_TIMEOUT,
.blacklisted_interfaces = NULL,
+ .allow_hostname_updates = TRUE,
};
static GKeyFile *load_config(const char *file)
@@ -243,6 +245,14 @@ static void parse_config(GKeyFile *config)
g_strdupv(default_blacklist);
g_clear_error(&error);
+
+ boolean = g_key_file_get_boolean(config, "General",
+ "AllowHostnameUpdates",
+ &error);
+ if (error == NULL)
+ connman_settings.allow_hostname_updates = boolean;
+
+ g_clear_error(&error);
}
static int config_init(const char *file)
@@ -403,6 +413,9 @@ connman_bool_t connman_setting_get_bool(const char *key)
if (g_str_equal(key, "BackgroundScanning") == TRUE)
return connman_settings.bg_scan;
+ if (g_str_equal(key, "AllowHostnameUpdates") == TRUE)
+ return connman_settings.allow_hostname_updates;
+
return FALSE;
}