You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2005/11/23 11:16:04 UTC
svn commit: r348405 - /apr/apr/trunk/test/testsock.c
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);