diff options
Diffstat (limited to 'vpn/vpn-config.c')
-rwxr-xr-x | vpn/vpn-config.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/vpn/vpn-config.c b/vpn/vpn-config.c index 97e072c6..e412b89c 100755 --- a/vpn/vpn-config.c +++ b/vpn/vpn-config.c @@ -265,7 +265,7 @@ static int load_provider(GKeyFile *keyfile, const char *group, #if !defined TIZEN_EXT DBG("invalid values host %s domain %s", host, domain); #else - DBG("invalid values host %s domain %s name %s", host, domain, name); + DBG("invalid configuration: no host specified"); #endif err = -EINVAL; goto err; @@ -594,3 +594,18 @@ char **__vpn_config_get_string_list(GKeyFile *key_file, return strlist; } + +bool __vpn_config_get_boolean(GKeyFile *key_file, const char *group_name, + const char *key, bool default_value) +{ + GError *error = NULL; + bool val; + + val = g_key_file_get_boolean(key_file, group_name, key, &error); + if (error) { + g_error_free(error); + return default_value; + } + + return val; +} |