summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/provision.h2
-rw-r--r--plugins/wifi.c2
-rw-r--r--src/config.c6
3 files changed, 7 insertions, 3 deletions
diff --git a/include/provision.h b/include/provision.h
index f154d4fb..d6d7c72c 100644
--- a/include/provision.h
+++ b/include/provision.h
@@ -42,7 +42,7 @@ struct connman_config_entry {
connman_bool_t hidden;
};
-struct connman_config_entry **connman_config_get_entries(void);
+struct connman_config_entry **connman_config_get_entries(const char *type);
void connman_config_free_entries(struct connman_config_entry **entries);
#ifdef __cplusplus
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 1e9d28c9..4b097fca 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -424,7 +424,7 @@ static int get_hidden_connections(int max_ssids,
/*
* Check if there are any hidden AP that needs to be provisioned.
*/
- entries = connman_config_get_entries();
+ entries = connman_config_get_entries("wifi");
for (i = 0; entries && entries[i]; i++) {
int len;
diff --git a/src/config.c b/src/config.c
index 686d8cec..6321663e 100644
--- a/src/config.c
+++ b/src/config.c
@@ -842,7 +842,7 @@ int __connman_config_provision_service_ident(struct connman_service *service,
return ret;
}
-struct connman_config_entry **connman_config_get_entries(void)
+struct connman_config_entry **connman_config_get_entries(const char *type)
{
GHashTableIter iter_file, iter_config;
gpointer value, key;
@@ -866,6 +866,10 @@ struct connman_config_entry **connman_config_get_entries(void)
&value) == TRUE) {
struct connman_config_service *config = value;
+ if (type != NULL &&
+ g_strcmp0(config->type, type) != 0)
+ continue;
+
entries[i] = g_try_new0(struct connman_config_entry,
1);
if (entries[i] == NULL)