diff mbox

P2P: Increment sd_pending_bcast_queries if Service Discovery fails

Message ID 4C1DBEFB7273DE458C60612E705738EE25776109@IRSMSX106.ger.corp.intel.com
State Superseded
Headers show

Commit Message

Constantin Musca Sept. 18, 2014, 12:22 p.m. UTC
Please disregard this patch and look at the reworked one:
[PATCH] P2P: Decrement sd_pending_bcast_queries when sd returns success

Thanks,
Constantin

-----Original Message-----
From: Musca, Constantin 
Sent: Wednesday, September 17, 2014 10:03 PM
To: hostap@lists.shmoo.com
Cc: Musca, Constantin
Subject: [PATCH] P2P: Increment sd_pending_bcast_queries if Service Discovery fails

If the Service Discovery Query TX callback returns an unsuccessful status increment the sd_peer pending_bcast_queries variable to resend the Service Discovery request.

Signed-off-by: Constantin Musca <constantin.musca@intel.com>
---
 src/p2p/p2p.c | 4 ++++
 1 file changed, 4 insertions(+)

--
1.9.1
diff mbox

Patch

diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index e746310..7aea86d 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -2764,6 +2764,10 @@  static void p2p_sd_cb(struct p2p_data *p2p, int success)
 	p2p->pending_action_state = P2P_NO_PENDING_ACTION;
 
 	if (!success) {
+		if (p2p->sd_peer->sd_pending_bcast_queries == -1) {
+			p2p->sd_peer->sd_pending_bcast_queries = 0;
+		}
+		p2p->sd_peer->sd_pending_bcast_queries++;
 		p2p->sd_peer = NULL;
 		p2p_continue_find(p2p);
 		return;