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>
This commit is contained in:
Jouni Malinen 2014-12-27 21:43:30 +02:00
parent 91c539c01d
commit 84edd136b5

View 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);