From 2049af2bd5fb945d4b9ec973b98edc6efd22938d Mon Sep 17 00:00:00 2001 From: Ardong Chen Date: Tue, 7 Sep 2010 17:35:42 +0300 Subject: [PATCH] P2P: Fix invitation_received callback to use NULL bssid (if not known) Previously, the storage buffer for the Group BSSID was returned regardless of whether it was included in the invitation or not. --- src/p2p/p2p_invitation.c | 2 +- wpa_supplicant/p2p_supplicant.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p2p/p2p_invitation.c b/src/p2p/p2p_invitation.c index 052690b14..7d9ac4837 100644 --- a/src/p2p/p2p_invitation.c +++ b/src/p2p/p2p_invitation.c @@ -403,7 +403,7 @@ void p2p_invitation_resp_cb(struct p2p_data *p2p, int success) if (success && p2p->cfg->invitation_received) { p2p->cfg->invitation_received(p2p->cfg->cb_ctx, p2p->inv_sa, - p2p->inv_group_bssid, + p2p->inv_group_bssid_ptr, p2p->inv_ssid, p2p->inv_ssid_len, p2p->inv_go_dev_addr, p2p->inv_status, diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index efe5b60de..39d665471 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -1835,7 +1835,7 @@ static void wpas_invitation_received(void *ctx, const u8 *sa, const u8 *bssid, if (s) { wpas_p2p_group_add_persistent( wpa_s, s, s->mode == WPAS_MODE_P2P_GO, 0); - } else { + } else if (bssid) { wpas_p2p_join(wpa_s, bssid, go_dev_addr, wpa_s->p2p_wps_method); }