config = g_hash_table_lookup(config_table, ident);
if (config != NULL) {
+ int ret;
+
g_hash_table_remove_all(config->service_table);
load_config(config);
- __connman_service_provision_changed(ident);
+ ret = __connman_service_provision_changed(ident);
+ if (ret > 0) {
+ /*
+ * Re-scan the config file for any
+ * changes
+ */
+ g_hash_table_remove_all(config->service_table);
+ load_config(config);
+ __connman_service_provision_changed(ident);
+ }
}
}
{
enum connman_service_type type;
struct connman_config *config;
+ int ret = 0;
DBG("service %p", service);
DBG("found %d ident %s file %s entry %s", found, ident,
file, entry);
- if (found == FALSE)
+ if (found == FALSE) {
/*
* The entry+8 will skip "service_" prefix
*/
g_hash_table_remove(config->service_table,
entry + 8);
+ ret = 1;
+ }
}
g_hash_table_foreach(config->service_table,
provision_service, service);
}
- return 0;
+ return ret;
}