aboutsummaryrefslogtreecommitdiffstats
path: root/src/p2p
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-05-08 17:02:28 +0300
committerJouni Malinen <j@w1.fi>2012-05-08 17:02:28 +0300
commit701fe506c80fe864e85f2647f8a1b1c76497cfed (patch)
tree90dd2c180f2a61fa0ae8cf1e4841215f211d4774 /src/p2p
parent3fe8b68d63060d7766946bf29f937e255e1bd749 (diff)
downloadexternal_wpa_supplicant_8_ti-701fe506c80fe864e85f2647f8a1b1c76497cfed.zip
external_wpa_supplicant_8_ti-701fe506c80fe864e85f2647f8a1b1c76497cfed.tar.gz
external_wpa_supplicant_8_ti-701fe506c80fe864e85f2647f8a1b1c76497cfed.tar.bz2
P2P: Do not use prov_disc_resp() callback for rejected PD
Commit 349b213cc8babdc0212938714104f7e28d34b335 added a separate callback prov_disc_fail() for indicating PD failures, but it left the Provision Discovery Response handler to call both callbacks in case the peer rejected the PD. Commit f65a239ba4760cc6e8a169d21a4fcabed444a90b added ctrl_iface event for PD failures. This combination can result in two ctrl_iface events in the peer rejecting a PD case. Clean this up by only indicating the failure event. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/p2p')
-rw-r--r--src/p2p/p2p_pd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c
index 7f18766..2985e5a 100644
--- a/src/p2p/p2p_pd.c
+++ b/src/p2p/p2p_pd.c
@@ -199,6 +199,7 @@ void p2p_process_prov_disc_resp(struct p2p_data *p2p, const u8 *sa,
struct p2p_message msg;
struct p2p_device *dev;
u16 report_config_methods = 0;
+ int success = 0;
if (p2p_parse(data, len, &msg))
return;
@@ -267,11 +268,12 @@ void p2p_process_prov_disc_resp(struct p2p_data *p2p, const u8 *sa,
dev->wps_prov_info = msg.wps_config_methods;
p2p_parse_free(&msg);
+ success = 1;
out:
dev->req_config_methods = 0;
p2p->cfg->send_action_done(p2p->cfg->cb_ctx);
- if (p2p->cfg->prov_disc_resp)
+ if (success && p2p->cfg->prov_disc_resp)
p2p->cfg->prov_disc_resp(p2p->cfg->cb_ctx, sa,
report_config_methods);
}