diff options
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index d27fb732..98da9d03 100644 --- a/src/config.c +++ b/src/config.c @@ -54,6 +54,7 @@ struct connman_config { char *ident; char *name; char *description; + connman_bool_t protected; GHashTable *service_table; }; @@ -69,6 +70,7 @@ static uint inotify_watch = 0; /* Definition of possible strings in the .config files */ #define CONFIG_KEY_NAME "Name" #define CONFIG_KEY_DESC "Description" +#define CONFIG_KEY_PROT "Protected" #define SERVICE_KEY_TYPE "Type" #define SERVICE_KEY_NAME "Name" @@ -86,6 +88,7 @@ static uint inotify_watch = 0; static const char *config_possible_keys[] = { CONFIG_KEY_NAME, CONFIG_KEY_DESC, + CONFIG_KEY_PROT, NULL, }; @@ -323,6 +326,7 @@ static int load_config(struct connman_config *config) gsize length; char **groups; char *str; + gboolean protected; int i; DBG("config %p", config); @@ -346,6 +350,10 @@ static int load_config(struct connman_config *config) config->description = str; } + protected = g_key_file_get_boolean(keyfile, "global", + CONFIG_KEY_PROT, NULL); + config->protected = protected; + groups = g_key_file_get_groups(keyfile, &length); for (i = 0; groups[i] != NULL; i++) { |