diff options
author | Niraj Kumar Goit <niraj.g@samsung.com> | 2022-02-17 21:43:13 +0530 |
---|---|---|
committer | Niraj Kumar Goit <niraj.g@samsung.com> | 2022-02-23 21:00:32 +0530 |
commit | bf0e619ef451bde3568c1af509ccb12cbda2ff93 (patch) | |
tree | edc77ad122572a91f8ec267629fb1c4ffffabb4b /vpn/vpn-config.c | |
parent | 2985b9822ac3f5acfef2933cbda98c1285e11af4 (diff) | |
parent | f89b473dfd8e916314b534b3397442f8c869c783 (diff) | |
download | connman-bf0e619ef451bde3568c1af509ccb12cbda2ff93.tar.gz connman-bf0e619ef451bde3568c1af509ccb12cbda2ff93.tar.bz2 connman-bf0e619ef451bde3568c1af509ccb12cbda2ff93.zip |
Merge tag 'upstream/1.40' into tizen.submit/tizen/20220224.061208
Change-Id: I4ed89827d776db6eeec11878bc1cd0cd6c5e1e80
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Signed-off-by: Anjali Nijhara <a.nijhara@samsung.com>
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; +} |