From 19b58818f56b3a2620ea94690b19bf4acf6b568c Mon Sep 17 00:00:00 2001 From: Shivani Baranwal Date: Thu, 11 Jul 2024 23:12:24 +0530 Subject: [PATCH] sta_send_p2p_invitation_req: Handle invitation accepted Signed-off-by: Shivani Baranwal --- p2p.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/p2p.c b/p2p.c index 39a5f36..60122f5 100644 --- a/p2p.c +++ b/p2p.c @@ -1567,6 +1567,11 @@ cmd_sta_send_p2p_invitation_req(struct sigma_dut *dut, struct sigma_conn *conn, char buf[4096]; struct wpa_ctrl *ctrl; int res; + const char *events[] = { + "P2P-INVITATION-RESULT", + "P2P-INVITATION-ACCEPTED", + NULL + }; if (devid == NULL || grpid == NULL) return -1; @@ -1633,8 +1638,7 @@ cmd_sta_send_p2p_invitation_req(struct sigma_dut *dut, struct sigma_conn *conn, return -2; } - res = get_wpa_cli_event(dut, ctrl, "P2P-INVITATION-RESULT", - buf, sizeof(buf)); + res = get_wpa_cli_events(dut, ctrl, events, buf, sizeof(buf)); wpa_ctrl_detach(ctrl); wpa_ctrl_close(ctrl);