Skip to content

Commit

Permalink
Fixing connection.cpp issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jholloc committed Jul 26, 2023
1 parent 1d301c5 commit a20bee3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions source/client/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ int createConnection(XDR* client_input, XDR* client_output, time_t *tv_server_st
close(client_socket);
}
#else
closesocket(clientSocket);
closesocket(client_socket);
#endif
client_socket = -1;
freeaddrinfo(result);
Expand Down Expand Up @@ -381,7 +381,7 @@ int createConnection(XDR* client_input, XDR* client_output, time_t *tv_server_st
#ifndef _WIN32
close(client_socket);
#else
closesocket(clientSocket);
closesocket(client_socket);
#endif
client_socket = -1;
#if defined(SSLAUTHENTICATION) && !defined(FATCLIENT)
Expand Down Expand Up @@ -459,7 +459,7 @@ int createConnection(XDR* client_input, XDR* client_output, time_t *tv_server_st
close(client_socket);
}
#else
closesocket(clientSocket);
closesocket(client_socket);
#endif
client_socket = -1;
freeaddrinfo(result);
Expand Down Expand Up @@ -494,7 +494,7 @@ int createConnection(XDR* client_input, XDR* client_output, time_t *tv_server_st
close(client_socket);
}
#else
closesocket(clientSocket);
closesocket(client_socket);
#endif
client_socket = -1;
if (result) freeaddrinfo(result);
Expand Down Expand Up @@ -623,7 +623,7 @@ int clientWriteout(void* iohandle ALLOW_UNUSED_TYPE, char* buf, int count)
#ifndef _WIN32
while (((rc = (int)write(client_socket, buf, count)) == -1) && (errno == EINTR)) {}
#else
while (((rc = send(clientSocket, buf , count, 0)) == SOCKET_ERROR) && (errno == EINTR)) {}
while (((rc = send(client_socket, buf , count, 0)) == SOCKET_ERROR) && (errno == EINTR)) {}
#endif
BytesSent += rc;
buf += rc;
Expand Down Expand Up @@ -664,7 +664,7 @@ int clientReadin(void* iohandle ALLOW_UNUSED_TYPE, char* buf, int count)
#ifndef _WIN32
while (((rc = (int)read(client_socket, buf, count)) == -1) && (errno == EINTR)) {}
#else
while ((( rc=recv( clientSocket, buf, count, 0)) == SOCKET_ERROR ) && (errno == EINTR)) {}
while (((rc = recv(client_socket, buf, count, 0)) == SOCKET_ERROR) && (errno == EINTR)) {}
#endif

// As we have waited to be told that there is data to be read, if nothing
Expand Down

0 comments on commit a20bee3

Please sign in to comment.