diff --git a/tests/server/mqttd.c b/tests/server/mqttd.c index 46760b94dd..1558ef1df1 100644 --- a/tests/server/mqttd.c +++ b/tests/server/mqttd.c @@ -110,7 +110,7 @@ static char loglockfile[256]; static bool use_ipv6 = FALSE; #endif static const char *ipv_inuse = "IPv4"; -static unsigned short port = DEFAULT_PORT; +static unsigned short my_port = DEFAULT_PORT; static void resetdefaults(void) { @@ -994,7 +994,7 @@ int main(int argc, char *argv[]) argv[arg]); return 0; } - port = util_ultous(ulnum); + my_port = util_ultous(ulnum); arg++; } } @@ -1044,7 +1044,7 @@ int main(int argc, char *argv[]) { /* passive daemon style */ - sock = sockdaemon(sock, &port); + sock = sockdaemon(sock, &my_port); if(CURL_SOCKET_BAD == sock) { goto mqttd_cleanup; } @@ -1052,14 +1052,14 @@ int main(int argc, char *argv[]) } logmsg("Running %s version", ipv_inuse); - logmsg("Listening on port %hu", port); + logmsg("Listening on port %hu", my_port); wrotepidfile = write_pidfile(pidname); if(!wrotepidfile) { goto mqttd_cleanup; } - wroteportfile = write_portfile(portname, port); + wroteportfile = write_portfile(portname, my_port); if(!wroteportfile) { goto mqttd_cleanup; } diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index 90b7b5568b..1db20cfcc3 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -141,7 +141,7 @@ static bool bind_only = FALSE; static bool use_ipv6 = FALSE; #endif static const char *ipv_inuse = "IPv4"; -static unsigned short port = DEFAULT_PORT; +static unsigned short my_port = DEFAULT_PORT; static unsigned short connectport = 0; /* if non-zero, we activate this mode */ enum sockmode { @@ -1141,7 +1141,8 @@ static bool juggle(curl_socket_t *sockfdp, else if(!memcmp("PORT", buffer, 4)) { /* Question asking us what PORT number we are listening to. Replies to PORT with "IPv[num]/[port]" */ - msnprintf((char *)buffer, sizeof(buffer), "%s/%hu\n", ipv_inuse, port); + msnprintf((char *)buffer, sizeof(buffer), "%s/%hu\n", + ipv_inuse, my_port); buffer_len = (ssize_t)strlen((char *)buffer); msnprintf(data, sizeof(data), "PORT\n%04zx\n", buffer_len); if(!write_stdout(data, 10)) @@ -1458,7 +1459,7 @@ int main(int argc, char *argv[]) if(argc > arg) { char *endptr; unsigned long ulnum = strtoul(argv[arg], &endptr, 10); - port = util_ultous(ulnum); + my_port = util_ultous(ulnum); arg++; } } @@ -1571,7 +1572,7 @@ int main(int argc, char *argv[]) } else { /* passive daemon style */ - sock = sockdaemon(sock, &port); + sock = sockdaemon(sock, &my_port); if(CURL_SOCKET_BAD == sock) { write_stdout("FAIL\n", 5); goto sockfilt_cleanup; @@ -1584,9 +1585,9 @@ int main(int argc, char *argv[]) if(connectport) logmsg("Connected to port %hu", connectport); else if(bind_only) - logmsg("Bound without listening on port %hu", port); + logmsg("Bound without listening on port %hu", my_port); else - logmsg("Listening on port %hu", port); + logmsg("Listening on port %hu", my_port); wrotepidfile = write_pidfile(pidname); if(!wrotepidfile) { @@ -1594,7 +1595,7 @@ int main(int argc, char *argv[]) goto sockfilt_cleanup; } if(portname) { - wroteportfile = write_portfile(portname, port); + wroteportfile = write_portfile(portname, my_port); if(!wroteportfile) { write_stdout("FAIL\n", 5); goto sockfilt_cleanup; diff --git a/tests/server/socksd.c b/tests/server/socksd.c index 7b3b32cd12..8f7619af58 100644 --- a/tests/server/socksd.c +++ b/tests/server/socksd.c @@ -138,7 +138,7 @@ static const char *reqlogfile = DEFAULT_REQFILE; static const char *configfile = DEFAULT_CONFIG; static const char *socket_type = "IPv4"; -static unsigned short port = DEFAULT_PORT; +static unsigned short my_port = DEFAULT_PORT; static void resetdefaults(void) { @@ -1061,7 +1061,7 @@ int main(int argc, char *argv[]) if(argc > arg) { char *endptr; unsigned long ulnum = strtoul(argv[arg], &endptr, 10); - port = util_ultous(ulnum); + my_port = util_ultous(ulnum); arg++; } } @@ -1106,7 +1106,7 @@ int main(int argc, char *argv[]) { /* passive daemon style */ - sock = sockdaemon(sock, &port + sock = sockdaemon(sock, &my_port #ifdef USE_UNIX_SOCKETS , unix_socket #endif @@ -1127,7 +1127,7 @@ int main(int argc, char *argv[]) logmsg("Listening on Unix socket %s", unix_socket); else #endif - logmsg("Listening on port %hu", port); + logmsg("Listening on port %hu", my_port); wrotepidfile = write_pidfile(pidname); if(!wrotepidfile) { @@ -1135,7 +1135,7 @@ int main(int argc, char *argv[]) } if(portname) { - wroteportfile = write_portfile(portname, port); + wroteportfile = write_portfile(portname, my_port); if(!wroteportfile) { goto socks5_cleanup; }