- Name: Name of the network.
- Description: Description of the network.
- Protected: Configuration protection against being removed, modified or
-overwritten by a Manager.ProvisionService() call. By default, a configuration
-is not protected.
+overwritten by a Manager.ProvisionService() call. If unset, this value defaults
+to TRUE, i.e. configs are protected by default.
Service entry [service_*]
static int load_config(struct connman_config *config)
{
GKeyFile *keyfile;
+ GError *error = NULL;
gsize length;
char **groups;
char *str;
}
protected = g_key_file_get_boolean(keyfile, "global",
- CONFIG_KEY_PROT, NULL);
- config->protected = protected;
+ CONFIG_KEY_PROT, &error);
+ if (error == NULL)
+ config->protected = protected;
+ else
+ config->protected = TRUE;
groups = g_key_file_get_groups(keyfile, &length);
service_name);
g_key_file_set_string(keyfile, "global", CONFIG_KEY_DESC,
"Internal Config File");
+ g_key_file_set_boolean(keyfile, "global", CONFIG_KEY_PROT, FALSE);
content = g_key_file_to_data(keyfile, &content_length, NULL);
if (content == NULL) {