From 9705b39c2b43910e04cd76e7008fcec9a9b9b4c8 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 6 Feb 2018 21:29:31 -0800 Subject: [PATCH] GUACAMOLE-324: Continuously write chunks of data until entire buffer has been sent. --- src/libguac/socket-fd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libguac/socket-fd.c b/src/libguac/socket-fd.c index e9cce0fb..34898524 100644 --- a/src/libguac/socket-fd.c +++ b/src/libguac/socket-fd.c @@ -102,10 +102,10 @@ ssize_t guac_socket_fd_write(guac_socket* socket, #ifdef ENABLE_WINSOCK /* WSA only works with send() */ - retval = send(data->fd, buf, count, 0); + retval = send(data->fd, buffer, count, 0); #else /* Use write() for all other platforms */ - retval = write(data->fd, buf, count); + retval = write(data->fd, buffer, count); #endif /* Record errors in guac_error */ @@ -115,7 +115,7 @@ ssize_t guac_socket_fd_write(guac_socket* socket, return retval; } - /* Advance buffer as data retval */ + /* Advance buffer to next chunk */ buffer += retval; count -= retval;