]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Reduce peer expiration age to 60 sec and allow customization
authorDmitry Shmidt <dimitrysh@google.com>
Fri, 17 Jan 2014 18:58:50 +0000 (10:58 -0800)
committerJouni Malinen <j@w1.fi>
Tue, 21 Jan 2014 14:24:40 +0000 (16:24 +0200)
The new default value (from 300 to 60 seconds) makes the internal P2P
peer list somewhat faster to react to peers becoming unreachable while
still maintaining entries for some time to avoid them disappearing
during user interaction (e.g., selecting a peer for a connection or
entering a PIN).

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
src/p2p/p2p.c

index 0f722fb33e5c750c1eb1be9d33ceb6f7c9a05472..8aabfc01b6b7cedff450e3ed88c93deacfa9f799 100644 (file)
@@ -41,7 +41,9 @@ static void p2p_scan_timeout(void *eloop_ctx, void *timeout_ctx);
  * P2P_PEER_EXPIRATION_AGE - Number of seconds after which inactive peer
  * entries will be removed
  */
-#define P2P_PEER_EXPIRATION_AGE 300
+#ifndef P2P_PEER_EXPIRATION_AGE
+#define P2P_PEER_EXPIRATION_AGE 60
+#endif /* P2P_PEER_EXPIRATION_AGE */
 
 #define P2P_PEER_EXPIRATION_INTERVAL (P2P_PEER_EXPIRATION_AGE / 2)