From: Jouni Malinen Date: Thu, 1 Jan 2015 15:47:29 +0000 (+0200) Subject: D-Bus: Fix error message for Listen() failure X-Git-Tag: hostap_2_4~594 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce82168b5597a27c372b836f1b003d3d4422b225;p=thirdparty%2Fhostap.git D-Bus: Fix error message for Listen() failure DBUS_ERROR_NO_MEMORY does not look like the best option for the failure reason in case wpas_p2p_listen() fails. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c index e3b850555..c6a36cc5f 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c +++ b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c @@ -192,9 +192,11 @@ DBusMessage * wpas_dbus_handler_p2p_listen(DBusMessage *message, if (wpa_s->p2p_dev) wpa_s = wpa_s->p2p_dev; - if (wpas_p2p_listen(wpa_s, (unsigned int)timeout)) - return dbus_message_new_error(message, DBUS_ERROR_NO_MEMORY, - NULL); + if (wpas_p2p_listen(wpa_s, (unsigned int) timeout)) { + return dbus_message_new_error(message, + WPAS_DBUS_ERROR_UNKNOWN_ERROR, + "Could not start P2P listen"); + } return NULL; }