Have services remove method also clear the passphrase
authorJoshua Lock <josh@linux.intel.com>
Thu, 2 Jul 2009 11:00:53 +0000 (12:00 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 2 Jul 2009 11:29:42 +0000 (04:29 -0700)
doc/service-api.txt
src/service.c

index 6866137..e9349fc 100644 (file)
@@ -60,6 +60,9 @@ Methods               dict GetProperties()
                        can be removed this way. If it is connected, it will
                        be automatically disconnected first.
 
+                       If the service requires a passphrase it will be
+                       cleared and forgotten when removing.
+
                        This is similar to setting the Favorite property
                        to false, but that is currently not supported.
 
index 910ba6c..ab73772 100644 (file)
@@ -550,6 +550,9 @@ static DBusMessage *remove_service(DBusConnection *conn,
        if (service->network != NULL)
                __connman_network_disconnect(service->network);
 
+       g_free (service->passphrase);
+       service->passphrase = NULL;
+
        connman_service_set_favorite(service, FALSE);
        __connman_storage_save_service(service);