wpa_cli: Correct return value of wpa_cli_cmd_p2p_peers

Signed-off-by: David Spinadel <david.spinadel@intel.com>
This commit is contained in:
David Spinadel 2011-11-24 21:19:52 +02:00 committed by Jouni Malinen
parent f551fa8d50
commit 9a6ade33d4

View file

@ -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;
}