You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@locus.apache.org on 2000/06/27 04:01:00 UTC
cvs commit: apache-2.0/src/lib/apr/test server.c
trawick 00/06/26 19:00:59
Modified: src/lib/apr/test server.c
Log:
Turn on SO_REUSEADDR in the server test program.
Revision Changes Path
1.12 +8 -0 apache-2.0/src/lib/apr/test/server.c
Index: server.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/test/server.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- server.c 2000/04/14 15:58:44 1.11
+++ server.c 2000/06/27 02:00:58 1.12
@@ -102,6 +102,14 @@
}
fprintf(stdout, "OK\n");
+ fprintf(stdout, "\tServer: Setting socket option REUSEADDR.......");
+ if (ap_setsocketopt(sock, APR_SO_REUSEADDR, 1) != APR_SUCCESS) {
+ ap_close_socket(sock);
+ fprintf(stderr, "Couldn't set socket option\n");
+ exit(-1);
+ }
+ fprintf(stdout, "OK\n");
+
fprintf(stdout, "\tServer: Setting port for socket.......");
if (ap_set_local_port(sock, 8021) != APR_SUCCESS) {
ap_close_socket(sock);