summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/config.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/config.c b/src/config.c
index db152283..9b98f71d 100644
--- a/src/config.c
+++ b/src/config.c
@@ -378,7 +378,7 @@ static int load_config(struct connman_config *config)
gsize length;
char **groups;
char *str;
- gboolean protected;
+ gboolean protected, found = FALSE;
int i;
DBG("config %p", config);
@@ -412,10 +412,17 @@ static int load_config(struct connman_config *config)
groups = g_key_file_get_groups(keyfile, &length);
for (i = 0; groups[i] != NULL; i++) {
- if (g_str_has_prefix(groups[i], "service_") == TRUE)
- load_service(keyfile, groups[i], config);
+ if (g_str_has_prefix(groups[i], "service_") == TRUE) {
+ if (load_service(keyfile, groups[i], config) == 0)
+ found = TRUE;
+ }
}
+ if (found == FALSE)
+ connman_warn("Config file %s/%s.config does not contain any "
+ "configuration that can be provisioned!",
+ STORAGEDIR, config->ident);
+
g_strfreev(groups);
g_key_file_free(keyfile);