Browse Source

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.
Ardong Chen 14 years ago
parent
commit
2049af2bd5
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/p2p/p2p_invitation.c
  2. 1 1
      wpa_supplicant/p2p_supplicant.c

+ 1 - 1
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,

+ 1 - 1
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);
 		}