summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2000-06-27 02:00:58 +0000
committerJeff Trawick <trawick@apache.org>2000-06-27 02:00:58 +0000
commit2ae2aea71c39cc3212d6402c4530a396f41ef035 (patch)
treef42e4bac8494b57336e4d981e347e6a2b0857bdd /test
parentb4e9297097ca678d2e69d68f53a5123f20f39f2d (diff)
downloadapr-2ae2aea71c39cc3212d6402c4530a396f41ef035.tar.gz
Turn on SO_REUSEADDR in the server test program.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60265 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/server.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/server.c b/test/server.c
index 3207915f6..aad0de270 100644
--- a/test/server.c
+++ b/test/server.c
@@ -102,6 +102,14 @@ int main(int argc, char *argv[])
}
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);