diff options
Diffstat (limited to 'libvncclient/sockets.c')
-rw-r--r-- | libvncclient/sockets.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/libvncclient/sockets.c b/libvncclient/sockets.c index 1a8df56..76441f9 100644 --- a/libvncclient/sockets.c +++ b/libvncclient/sockets.c @@ -136,15 +136,11 @@ ReadFromRFBServer(rfbClient* client, char *out, unsigned int n) while (client->buffered < n) { int i; -#ifdef LIBVNCSERVER_WITH_CLIENT_TLS if (client->tlsSession) { i = ReadFromTLS(client, client->buf + client->buffered, RFB_BUF_SIZE - client->buffered); } else { -#endif i = read(client->sock, client->buf + client->buffered, RFB_BUF_SIZE - client->buffered); -#ifdef LIBVNCSERVER_WITH_CLIENT_TLS } -#endif if (i <= 0) { if (i < 0) { #ifdef WIN32 @@ -178,15 +174,12 @@ ReadFromRFBServer(rfbClient* client, char *out, unsigned int n) while (n > 0) { int i; -#ifdef LIBVNCSERVER_WITH_CLIENT_TLS if (client->tlsSession) { i = ReadFromTLS(client, out, n); } else { -#endif i = read(client->sock, out, n); -#ifdef LIBVNCSERVER_WITH_CLIENT_TLS } -#endif + if (i <= 0) { if (i < 0) { #ifdef WIN32 @@ -241,7 +234,6 @@ WriteToRFBServer(rfbClient* client, char *buf, int n) if (client->serverPort==-1) return TRUE; /* vncrec playing */ -#ifdef LIBVNCSERVER_WITH_CLIENT_TLS if (client->tlsSession) { /* WriteToTLS() will guarantee either everything is written, or error/eof returns */ i = WriteToTLS(client, buf, n); @@ -249,7 +241,6 @@ WriteToRFBServer(rfbClient* client, char *buf, int n) return TRUE; } -#endif while (i < n) { j = write(client->sock, buf + i, (n - i)); |