diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2010-09-06 19:00:43 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2010-09-10 10:30:25 -0700 |
commit | fbe702723935c378faa11ed7a1738558185c459d (patch) | |
tree | 0576d4f3774001d83d2b2fb6bee093477f4bbf31 /src/p2p | |
parent | 014732ea8150226e6346b777742c3a39685e8dc3 (diff) | |
download | external_wpa_supplicant_8_ti-fbe702723935c378faa11ed7a1738558185c459d.zip external_wpa_supplicant_8_ti-fbe702723935c378faa11ed7a1738558185c459d.tar.gz external_wpa_supplicant_8_ti-fbe702723935c378faa11ed7a1738558185c459d.tar.bz2 |
P2P: Provide local event on GO Neg Req rejection
If an authorized (p2p_connect used locally) GO Negotiation is
rejected when receiving GO Negotiation Request from the peer,
indicate the failure with a ctrl_interface P2P-GO-NEG-FAILURE
event. Previously, this event was only shown on the peer (i.e.,
the device receiving the GO Negotiation Response with non-zero
Status code).
Diffstat (limited to 'src/p2p')
-rw-r--r-- | src/p2p/p2p.c | 4 | ||||
-rw-r--r-- | src/p2p/p2p_go_neg.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 1247678..5d45811 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -2070,6 +2070,10 @@ static void p2p_go_neg_resp_failure_cb(struct p2p_data *p2p, int success) wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: GO Negotiation Response (failure) TX callback: " "success=%d", success); + if (p2p->go_neg_peer && p2p->go_neg_peer->status != P2P_SC_SUCCESS) { + p2p_go_neg_failed(p2p, p2p->go_neg_peer, + p2p->go_neg_peer->status); + } } diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c index bf36c7a..1e64047 100644 --- a/src/p2p/p2p_go_neg.c +++ b/src/p2p/p2p_go_neg.c @@ -580,6 +580,8 @@ void p2p_process_go_neg_req(struct p2p_data *p2p, const u8 *sa, } fail: + if (dev) + dev->status = status; resp = p2p_build_go_neg_resp(p2p, dev, msg.dialog_token, status, !tie_breaker); p2p_parse_free(&msg); |