---
 include/provision.h | 2 +-
 plugins/wifi.c      | 2 +-
 src/config.c        | 6 +++++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/include/provision.h b/include/provision.h
index f154d4f..d6d7c72 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 1e9d28c..4b097fc 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 686d8ce..6321663 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)
-- 
1.7.11.4

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to