]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
D-Bus(old): Fix interface to show correct err_msg for blob removal
authorJouni Malinen <j@w1.fi>
Sat, 27 Dec 2014 19:43:30 +0000 (21:43 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 29 Dec 2014 13:49:05 +0000 (15:49 +0200)
The "Invalid blob name" string was not shown since the zero-length name
was used regardless of first verifying that it should not be allowed.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/dbus/dbus_old_handlers.c

index b78644bab2338e6698ae7f8cedba1560369b07db..c37f7709d50758ea2801ec1e19c850bbd92e41aa 100644 (file)
@@ -1428,8 +1428,7 @@ DBusMessage * wpas_dbus_iface_remove_blobs(DBusMessage *message,
                dbus_message_iter_get_basic(&array, &name);
                if (!os_strlen(name))
                        err_msg = "Invalid blob name.";
-
-               if (wpa_config_remove_blob(wpa_s->conf, name) != 0)
+               else if (wpa_config_remove_blob(wpa_s->conf, name) != 0)
                        err_msg = "Error removing blob.";
                else
                        wpas_notify_blob_removed(wpa_s, name);