aboutsummaryrefslogtreecommitdiff
path: root/tests/server
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-09-26 01:08:24 +0000
committerYang Tse <yangsita@gmail.com>2008-09-26 01:08:24 +0000
commit985bd18904a2184bc5c43f75a1dcbbcc1dc7256f (patch)
tree91208c5d09a58ffcbab2379ed2fdaf53aec25578 /tests/server
parent2d1f798d14bc27153d9de2eb57c69c90420fb54f (diff)
attempt to avoid HTTP server startup misdetection on some systems
Diffstat (limited to 'tests/server')
-rw-r--r--tests/server/sws.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/server/sws.c b/tests/server/sws.c
index 3b4b63d2b..58f951fca 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -71,6 +71,11 @@
#define CURL_SWS_FORK_ENABLED
#endif
+#ifdef ENABLE_IPV6
+static bool use_ipv6 = FALSE;
+#endif
+const char *ipv_inuse = "IPv4";
+
#define REQBUFSIZ 150000
#define REQBUFSIZ_TXT "149999"
@@ -858,7 +863,6 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
return 0;
}
-static bool use_ipv6=FALSE;
int main(int argc, char *argv[])
{
@@ -900,7 +904,8 @@ int main(int argc, char *argv[])
}
else if(!strcmp("--ipv6", argv[arg])) {
#ifdef ENABLE_IPV6
- use_ipv6=TRUE;
+ ipv_inuse = "IPv6";
+ use_ipv6 = TRUE;
#endif
arg++;
}
@@ -986,8 +991,7 @@ int main(int argc, char *argv[])
return 1;
}
- logmsg("Running IPv%d version on port %hu",
- (use_ipv6?6:4), port);
+ logmsg("Running %s version on port %d", ipv_inuse, (int)port);
/* start accepting connections */
rc = listen(sock, 5);