From: Jouni Malinen Date: Thu, 9 Aug 2012 19:48:02 +0000 (+0300) Subject: AOSP: go_neg_req_sent X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9acddf36e2eaa727d5c0bfce7224f1e5023f1ddb;p=thirdparty%2Fhostap.git AOSP: go_neg_req_sent --- diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 09c0878ad..f19b3f6bc 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -2744,12 +2744,19 @@ static void p2p_go_neg_req_cb(struct p2p_data *p2p, int success) } if (success) { +#ifndef ANDROID_P2P dev->go_neg_req_sent++; +#endif if (dev->flags & P2P_DEV_USER_REJECTED) { p2p_set_state(p2p, P2P_IDLE); return; } } +#ifdef ANDROID_P2P + else { + dev->go_neg_req_sent--; + } +#endif if (!success && (dev->info.dev_capab & P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY) && diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c index 1a0c7d497..6e818c235 100644 --- a/src/p2p/p2p_go_neg.c +++ b/src/p2p/p2p_go_neg.c @@ -203,6 +203,9 @@ int p2p_connect_send(struct p2p_data *p2p, struct p2p_device *dev) p2p->go_neg_peer = dev; dev->flags |= P2P_DEV_WAIT_GO_NEG_RESPONSE; dev->connect_reqs++; +#ifdef ANDROID_P2P + dev->go_neg_req_sent++; +#endif if (p2p_send_action(p2p, freq, dev->info.p2p_device_addr, p2p->cfg->dev_addr, dev->info.p2p_device_addr, wpabuf_head(req), wpabuf_len(req), 200) < 0) {