aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_old_handlers.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-12-27 19:43:30 (GMT)
committerJouni Malinen <j@w1.fi>2014-12-29 13:49:05 (GMT)
commit84edd136b5f0c303be0eeb43374da5aaafcc173e (patch)
tree3f1be6ff33a5cc232d3fc83faaa3a6c9a7d300ca /wpa_supplicant/dbus/dbus_old_handlers.c
parent91c539c01d96e08e00e690e2fbb781f6bf26abdc (diff)
downloadhostap-84edd136b5f0c303be0eeb43374da5aaafcc173e.zip
hostap-84edd136b5f0c303be0eeb43374da5aaafcc173e.tar.gz
hostap-84edd136b5f0c303be0eeb43374da5aaafcc173e.tar.bz2
D-Bus(old): Fix interface to show correct err_msg for blob removal
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>
Diffstat (limited to 'wpa_supplicant/dbus/dbus_old_handlers.c')
-rw-r--r--wpa_supplicant/dbus/dbus_old_handlers.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/wpa_supplicant/dbus/dbus_old_handlers.c b/wpa_supplicant/dbus/dbus_old_handlers.c
index b78644b..c37f770 100644
--- a/wpa_supplicant/dbus/dbus_old_handlers.c
+++ b/wpa_supplicant/dbus/dbus_old_handlers.c
@@ -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);