diff libfdcore/peers.c @ 933:04f590da5821

Add cmake option DISABLE_PEER_EXPIRY to disable dynamic peer expiration mechanism
author Sebastien Decugis <sdecugis@freediameter.net>
date Wed, 06 Mar 2013 16:39:07 +0100
parents 5053f1abcf5d
children 1bc052ef961f d95cd3ca9e8d
line wrap: on
line diff
--- a/libfdcore/peers.c	Sun Mar 03 09:16:42 2013 +0100
+++ b/libfdcore/peers.c	Wed Mar 06 16:39:07 2013 +0100
@@ -514,12 +514,14 @@
 		peer->p_flags.pf_responder = 1;
 		peer->p_flags.pf_delete = 1;
 		
+#ifndef DISABLE_PEER_EXPIRY
 		/* Set this peer to expire on inactivity */
 		peer->p_hdr.info.config.pic_flags.exp 	= PI_EXP_INACTIVE;
 		peer->p_hdr.info.config.pic_lft		= 3600;	/* 1 hour without any message 
 		-- RFC3539 states that this must not be inferior to BRINGDOWN_INTERVAL = 5 minutes */
+		
 		CHECK_FCT_DO( ret = fd_p_expi_update( peer ), goto out );
-
+#endif /* DISABLE_PEER_EXPIRY */
 		
 		/* Insert the new peer in the list (the PSM will take care of setting the expiry after validation) */
 		fd_list_insert_after( li_inf, &peer->p_hdr.chain );
"Welcome to our mercurial repository"