changeset 779:867156be8353

Always use REUSEADDR, not only in DEBUG
author Sebastien Decugis <sdecugis@nict.go.jp>
date Fri, 27 Jan 2012 07:41:22 +0100
parents 003df4a9ade2
children 69ef21d4a7fe
files libfdcore/sctp.c libfdcore/tcp.c
diffstat 2 files changed, 0 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libfdcore/sctp.c	Sat Jan 21 16:11:34 2012 +0100
+++ b/libfdcore/sctp.c	Fri Jan 27 07:41:22 2012 +0100
@@ -66,12 +66,10 @@
 	
 	CHECK_PARAMS( sk > 0 );
 	
-#ifdef DEBUG
 	{
 		int reuse = 1;
 		CHECK_SYS(  setsockopt(sk, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse))  );
 	}
-#endif /* DEBUG	*/
 	
 #ifdef ADJUST_RTX_PARAMS
 	/* Set the retransmit parameters */
--- a/libfdcore/tcp.c	Sat Jan 21 16:11:34 2012 +0100
+++ b/libfdcore/tcp.c	Fri Jan 27 07:41:22 2012 +0100
@@ -80,13 +80,10 @@
 	}
 	#endif /* IPV6_V6ONLY */
 	
-#ifdef DEBUG
 	{
 		opt = 1;
 		CHECK_SYS(  setsockopt(sk, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt))  );
 	}
-#endif /* DEBUG	*/
-	
 	
 	/* There are also others sockopt that can be set, but nothing useful for us AFAICT */
 	
"Welcome to our mercurial repository"