aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/server/sockfilt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index 204026be3..8f4fb0ede 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -170,6 +170,7 @@ static int juggle(curl_socket_t *sockfdp,
fd_set fds_err;
curl_socket_t maxfd;
ssize_t r;
+ int err;
unsigned char buffer[256]; /* FIX: bigger buffer */
char data[256];
curl_socket_t sockfd;
@@ -300,9 +301,14 @@ static int juggle(curl_socket_t *sockfdp,
logmsg("*** We are disconnected!");
write(fileno(stdout), "DISC\n", 5);
}
- else
+ else {
/* send away on the socket */
bytes_written = swrite(sockfd, buffer, len);
+ if(bytes_written != (ssize_t)len) {
+ logmsg("====> Not all data was sent. Bytes to send: %d Bytes sent: %d",
+ len, bytes_written);
+ }
+ }
}
else if(!memcmp("DISC", buffer, 4)) {
/* disconnect! */