Loading tests/server/tftpd.c +6 −3 Original line number Original line Diff line number Diff line Loading @@ -1196,8 +1196,8 @@ static void sendtftp(struct testcase *test, struct formats *pf) */ */ static void recvtftp(struct testcase *test, struct formats *pf) static void recvtftp(struct testcase *test, struct formats *pf) { { #if USE_WINSOCK #ifdef USE_WINSOCK DWORD recvtimeout; DWORD recvtimeout, recvtimeoutbak; #endif #endif ssize_t n, size; ssize_t n, size; recvblock = 0; recvblock = 0; Loading Loading @@ -1269,13 +1269,16 @@ send_ack: #endif #endif /* normally times out and quits */ /* normally times out and quits */ #ifdef USE_WINSOCK #ifdef USE_WINSOCK recvtimeout = sizeof(recvtimeoutbak); getsockopt(peer, SOL_SOCKET, SO_RCVTIMEO, (char*)&recvtimeoutbak, (int*)&recvtimeout); recvtimeout = 10; recvtimeout = 10; setsockopt(peer, SOL_SOCKET, SO_RCVTIMEO, setsockopt(peer, SOL_SOCKET, SO_RCVTIMEO, (const char*)&recvtimeout, sizeof(recvtimeout)); (const char*)&recvtimeout, sizeof(recvtimeout)); #endif #endif n = sread(peer, &buf.storage[0], sizeof(buf.storage)); n = sread(peer, &buf.storage[0], sizeof(buf.storage)); #ifdef USE_WINSOCK #ifdef USE_WINSOCK recvtimeout = 0; recvtimeout = recvtimeoutbak; setsockopt(peer, SOL_SOCKET, SO_RCVTIMEO, setsockopt(peer, SOL_SOCKET, SO_RCVTIMEO, (const char*)&recvtimeout, sizeof(recvtimeout)); (const char*)&recvtimeout, sizeof(recvtimeout)); #endif #endif Loading Loading
tests/server/tftpd.c +6 −3 Original line number Original line Diff line number Diff line Loading @@ -1196,8 +1196,8 @@ static void sendtftp(struct testcase *test, struct formats *pf) */ */ static void recvtftp(struct testcase *test, struct formats *pf) static void recvtftp(struct testcase *test, struct formats *pf) { { #if USE_WINSOCK #ifdef USE_WINSOCK DWORD recvtimeout; DWORD recvtimeout, recvtimeoutbak; #endif #endif ssize_t n, size; ssize_t n, size; recvblock = 0; recvblock = 0; Loading Loading @@ -1269,13 +1269,16 @@ send_ack: #endif #endif /* normally times out and quits */ /* normally times out and quits */ #ifdef USE_WINSOCK #ifdef USE_WINSOCK recvtimeout = sizeof(recvtimeoutbak); getsockopt(peer, SOL_SOCKET, SO_RCVTIMEO, (char*)&recvtimeoutbak, (int*)&recvtimeout); recvtimeout = 10; recvtimeout = 10; setsockopt(peer, SOL_SOCKET, SO_RCVTIMEO, setsockopt(peer, SOL_SOCKET, SO_RCVTIMEO, (const char*)&recvtimeout, sizeof(recvtimeout)); (const char*)&recvtimeout, sizeof(recvtimeout)); #endif #endif n = sread(peer, &buf.storage[0], sizeof(buf.storage)); n = sread(peer, &buf.storage[0], sizeof(buf.storage)); #ifdef USE_WINSOCK #ifdef USE_WINSOCK recvtimeout = 0; recvtimeout = recvtimeoutbak; setsockopt(peer, SOL_SOCKET, SO_RCVTIMEO, setsockopt(peer, SOL_SOCKET, SO_RCVTIMEO, (const char*)&recvtimeout, sizeof(recvtimeout)); (const char*)&recvtimeout, sizeof(recvtimeout)); #endif #endif Loading