X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/dd7b74e90a96eaf109796d8f9499578571a1572c..f9913671b40a2107bfbcc3b7fcf5823c5771eb42:/test/src/server.c diff --git a/test/src/server.c b/test/src/server.c index 4a48965e2..ce55c5c37 100644 --- a/test/src/server.c +++ b/test/src/server.c @@ -52,6 +52,7 @@ on all interfaces, unless the option -noipv6 is given. */ #ifndef CS # define CS (char *) +# define CCS (const char *) #endif @@ -397,7 +398,6 @@ else sin4.sin_addr.s_addr = (S_ADDR_TYPE)INADDR_ANY; sin4.sin_port = htons(port); if (bind(listen_socket[i], (struct sockaddr *)&sin4, sizeof(sin4)) < 0) - { if (listen_socket[v6n] < 0 || errno != EADDRINUSE) { printf("IPv4 socket bind() failed: %s\n", strerror(errno)); @@ -408,7 +408,6 @@ else close(listen_socket[i]); listen_socket[i] = -1; } - } } } } @@ -662,7 +661,7 @@ for (count = 0; count < connection_count; count++) n = dlen < sizeof(buffer) ? dlen : sizeof(buffer); if ((n = read(dup_accept_socket, CS buffer, n)) == 0) { - printf("Unxpected EOF read from client\n"); + printf("Unexpected EOF read from client\n"); s = s->next; goto END_OFF; } @@ -672,7 +671,7 @@ for (count = 0; count < connection_count; count++) while (dlen-- > 0) if (fgetc(in) == EOF) { - printf("Unxpected EOF read from client\n"); + printf("Unexpected EOF read from client\n"); s = s->next; goto END_OFF; } @@ -728,7 +727,7 @@ for (count = 0; count < connection_count; count++) alarm(0); n += offset; - printit(buffer, n); + printit(CS buffer, n); if (data) do { @@ -774,8 +773,10 @@ for (count = 0; count < connection_count; count++) } } - if (sscanf(buffer, "