diff options
| author | Irfan Sheriff <isheriff@google.com> | 2012-04-04 11:25:05 -0700 |
|---|---|---|
| committer | Irfan Sheriff <isheriff@google.com> | 2012-04-04 11:25:05 -0700 |
| commit | 40fa98b45e4e61fcf0cb9292fdf8882b0624bd35 (patch) | |
| tree | c3b89626556665100b97991090b4220d3b157124 | |
| parent | 067a17f056511e2761f07340fb3106dd59ad596a (diff) | |
| download | android_external_wpa_supplicant_8-40fa98b45e4e61fcf0cb9292fdf8882b0624bd35.tar.gz android_external_wpa_supplicant_8-40fa98b45e4e61fcf0cb9292fdf8882b0624bd35.tar.bz2 android_external_wpa_supplicant_8-40fa98b45e4e61fcf0cb9292fdf8882b0624bd35.zip | |
Fix service discovery add
Change-Id: If621eef6e7a16c83ae520650b8216a5f63488403
| -rw-r--r-- | src/p2p/p2p_sd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/p2p/p2p_sd.c b/src/p2p/p2p_sd.c index 9e3588a5..4e5a2e54 100644 --- a/src/p2p/p2p_sd.c +++ b/src/p2p/p2p_sd.c @@ -841,6 +841,7 @@ void * p2p_sd_request(struct p2p_data *p2p, const u8 *dst, const struct wpabuf *tlvs) { struct p2p_sd_query *q; + struct p2p_device *dev; q = os_zalloc(sizeof(*q)); if (q == NULL) @@ -859,6 +860,14 @@ void * p2p_sd_request(struct p2p_data *p2p, const u8 *dst, q->next = p2p->sd_queries; p2p->sd_queries = q; + + dl_list_for_each(dev, &p2p->devices, struct p2p_device, list) { + if (dst == NULL || + os_memcmp(dev->info.p2p_device_addr, dst, ETH_ALEN) == 0) { + dev->flags &= ~P2P_DEV_SD_INFO; + } + } + wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Added SD Query %p", q); return q; |
