apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r373504 - /apr/apr/trunk/test/testsockets.c
Date Mon, 30 Jan 2006 12:52:09 GMT
Author: jorton
Date: Mon Jan 30 04:52:05 2006
New Revision: 373504

URL: http://svn.apache.org/viewcvs?rev=373504&view=rev
Log:
* test/testsockets.c (sendto_receivefrom): Set REUSEADDR option before
binding sockets.

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

Modified: apr/apr/trunk/test/testsockets.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/test/testsockets.c?rev=373504&r1=373503&r2=373504&view=diff
==============================================================================
--- apr/apr/trunk/test/testsockets.c (original)
+++ apr/apr/trunk/test/testsockets.c Mon Jan 30 04:52:05 2006
@@ -139,6 +139,11 @@
     rv = apr_sockaddr_info_get(&from, addr, APR_UNSPEC, 7771, 0, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, 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_opt_set(sock2, APR_SO_REUSEADDR, 1);
+    APR_ASSERT_SUCCESS(tc, "Could not set REUSEADDR on socket2", rv);
+
     rv = apr_socket_bind(sock, to);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     rv = apr_socket_bind(sock2, from);



Mime
View raw message