service: clean up network for EAP in __connman_service_remove. 65/74365/1
authorNiraj Kumar Goit <niraj.g@samsung.com>
Tue, 14 Jun 2016 08:51:20 +0000 (14:21 +0530)
committerNiraj Kumar Goit <niraj.g@samsung.com>
Tue, 14 Jun 2016 10:22:42 +0000 (15:52 +0530)
Change-Id: I7fb2f7f0c2bf8cea04a8aecf7b1da69b47698132
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
src/service.c

index b424bd5..71e2c09 100755 (executable)
@@ -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);