diff options
author | Yang Tse <yangsita@gmail.com> | 2008-02-19 18:51:08 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-02-19 18:51:08 +0000 |
commit | 9df37b93df57488c21bd2027da070193ea4883a6 (patch) | |
tree | c28fd7c6a38b28bf56734d41b832a689b7a6d5f3 | |
parent | 7b5c86033afa9ee3d75a3848737816e5d0473f20 (diff) |
juggle() actually returns bool.
Remove redundant and unreachable log message.
-rw-r--r-- | tests/server/sockfilt.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index 042b9f531..aeefb23bd 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -160,9 +160,9 @@ enum sockmode { if sockfd is CURL_SOCKET_BAD, listendfd is a listening socket we must accept() */ -static int juggle(curl_socket_t *sockfdp, - curl_socket_t listenfd, - enum sockmode *mode) +static bool juggle(curl_socket_t *sockfdp, + curl_socket_t listenfd, + enum sockmode *mode) { struct timeval timeout; fd_set fds_read; @@ -308,18 +308,12 @@ static int juggle(curl_socket_t *sockfdp, buffer_len = (ssize_t)strtol((char *)buffer, NULL, 16); if (buffer_len > (ssize_t)sizeof(buffer)) { - logmsg("Buffer size %d too small for data size %d", - (int)sizeof(buffer), buffer_len); + logmsg("ERROR: Buffer size (%ld bytes) too small for data size " + "(%ld bytes)", (long)sizeof(buffer), (long)buffer_len); return FALSE; } logmsg("> %d bytes data, server => client", buffer_len); - if(buffer_len > (ssize_t)sizeof(buffer)) { - logmsg("ERROR: %d bytes of data does not fit within the %d " - "bytes buffer", buffer_len, sizeof(buffer)); - return FALSE; - } - /* * To properly support huge data chunks, we need to repeat the call * to read() until we're done or it fails. |