aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-01-01 15:47:29 (GMT)
committerJouni Malinen <j@w1.fi>2015-01-02 20:50:26 (GMT)
commitce82168b5597a27c372b836f1b003d3d4422b225 (patch)
tree56d163f2ffa67febfef4a06f22e2b9712d07417f /wpa_supplicant/dbus/dbus_new_handlers_p2p.c
parent054dc3136f798583f537e1ae11fdf096b5309fb6 (diff)
downloadhostap-ce82168b5597a27c372b836f1b003d3d4422b225.zip
hostap-ce82168b5597a27c372b836f1b003d3d4422b225.tar.gz
hostap-ce82168b5597a27c372b836f1b003d3d4422b225.tar.bz2
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 <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/dbus/dbus_new_handlers_p2p.c')
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers_p2p.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
index e3b8505..c6a36cc 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;
}