apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r348405 - /apr/apr/trunk/test/testsock.c
Date Wed, 23 Nov 2005 10:16:04 GMT
Author: jorton
Date: Wed Nov 23 02:15:59 2005
New Revision: 348405

URL: http://svn.apache.org/viewcvs?rev=348405&view=rev
Log:
* test/testsock.c (setup_socket): Set REUSEADDR option before binding
socket.

Modified:
    apr/apr/trunk/test/testsock.c

Modified: apr/apr/trunk/test/testsock.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/test/testsock.c?rev=348405&r1=348404&r2=348405&view=diff
==============================================================================
--- apr/apr/trunk/test/testsock.c (original)
+++ apr/apr/trunk/test/testsock.c Wed Nov 23 02:15:59 2005
@@ -84,6 +84,9 @@
 
     rv = apr_socket_create(&sock, sa->family, SOCK_STREAM, APR_PROTO_TCP, p);
     APR_ASSERT_SUCCESS(tc, "Problem creating socket", rv);
+
+    rv = apr_socket_opt_set(sock, APR_SO_REUSEADDR, 1);
+    APR_ASSERT_SUCCESS(tc, "Could not set REUSEADDR on socket", rv);
     
     rv = apr_socket_bind(sock, sa);
     APR_ASSERT_SUCCESS(tc, "Problem binding to port", rv);



Mime
View raw message