From 9a6ade33d4510bd292b33e5853ec72f28cc43950 Mon Sep 17 00:00:00 2001 From: David Spinadel Date: Thu, 24 Nov 2011 21:19:52 +0200 Subject: [PATCH] wpa_cli: Correct return value of wpa_cli_cmd_p2p_peers Signed-off-by: David Spinadel --- wpa_supplicant/wpa_cli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index fd38664..3311a01 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/wpa_supplicant/wpa_cli.c @@ -2376,13 +2376,13 @@ static int wpa_cli_cmd_p2p_peers(struct wpa_ctrl *ctrl, int argc, char *argv[]) if (wpa_ctrl_command_p2p_peer(ctrl, "P2P_PEER FIRST", addr, sizeof(addr), discovered)) - return 0; + return -1; do { os_snprintf(cmd, sizeof(cmd), "P2P_PEER NEXT-%s", addr); } while (wpa_ctrl_command_p2p_peer(ctrl, cmd, addr, sizeof(addr), discovered) == 0); - return -1; + return 0; } -- 2.1.4