]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AOSP: go_neg_req_sent
authorJouni Malinen <j@w1.fi>
Thu, 9 Aug 2012 19:48:02 +0000 (22:48 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 9 Aug 2012 20:18:32 +0000 (23:18 +0300)
src/p2p/p2p.c
src/p2p/p2p_go_neg.c

index 09c0878ad2a21aa01bdf779a884e7d351fd06b24..f19b3f6bc11154ebce334b1c87532629b26c23a3 100644 (file)
@@ -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) &&
index 1a0c7d4973b981376eb78da3f212878e6f152188..6e818c235230767b77aa86aeb5e96cd23d124c72 100644 (file)
@@ -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) {