Instead of directly changing the passphrase, use
__connman_service_set_passphrase() which does the passphrase sanity
checking.
---
 src/service.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/service.c b/src/service.c
index a34e9af..457e542 100644
--- a/src/service.c
+++ b/src/service.c
@@ -4972,10 +4972,8 @@ void __connman_service_set_string(struct connman_service 
*service,
        } else if (g_str_equal(key, "Phase2")) {
                g_free(service->phase2);
                service->phase2 = g_strdup(value);
-       } else if (g_str_equal(key, "Passphrase")) {
-               g_free(service->passphrase);
-               service->passphrase = g_strdup(value);
-       }
+       } else if (g_str_equal(key, "Passphrase"))
+               __connman_service_set_passphrase(service, value);
 }
 
 void __connman_service_set_search_domains(struct connman_service *service,
-- 
1.9.1

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to