From ec1a6e217ee11c79dc5618bc685abe60f4bcf127 Mon Sep 17 00:00:00 2001 From: Niraj Kumar Goit Date: Tue, 14 Jun 2016 14:21:20 +0530 Subject: service: clean up network for EAP in __connman_service_remove. Change-Id: I7fb2f7f0c2bf8cea04a8aecf7b1da69b47698132 Signed-off-by: Niraj Kumar Goit --- src/service.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/service.c b/src/service.c index b424bd5c..71e2c09c 100755 --- a/src/service.c +++ b/src/service.c @@ -4721,6 +4721,24 @@ static DBusMessage *disconnect_service(DBusConnection *conn, return g_dbus_create_reply(msg, DBUS_TYPE_INVALID); } +#if defined TIZEN_EXT +static void __connman_service_cleanup_network_8021x(struct connman_service *service) +{ + if (service == NULL) + return; + + DBG("service %p ", service); + + connman_network_set_string(service->network, "WiFi.EAP", NULL); + connman_network_set_string(service->network, "WiFi.Identity", NULL); + connman_network_set_string(service->network, "WiFi.CACertFile", NULL); + connman_network_set_string(service->network, "WiFi.ClientCertFile", NULL); + connman_network_set_string(service->network, "WiFi.PrivateKeyFile", NULL); + connman_network_set_string(service->network, "WiFi.PrivateKeyPassphrase", NULL); + connman_network_set_string(service->network, "WiFi.Phase2", NULL); +} +#endif + bool __connman_service_remove(struct connman_service *service) { if (service->type == CONNMAN_SERVICE_TYPE_ETHERNET || @@ -4765,6 +4783,8 @@ bool __connman_service_remove(struct connman_service *service) g_free(service->phase2); service->phase2 = NULL; + __connman_service_cleanup_network_8021x(service); + __connman_ipconfig_set_method(service->ipconfig_ipv4, CONNMAN_IPCONFIG_METHOD_DHCP); __connman_ipconfig_set_method(service->ipconfig_ipv6, CONNMAN_IPCONFIG_METHOD_AUTO); connman_service_set_proxy(service, NULL, false); -- cgit v1.2.3