From 77286f0831bbff0a3828f1987aa279ae9178619c Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Sun, 15 Apr 2012 16:50:40 +0200 Subject: LibVNCClient: Remove all those WITH_CLIENT_TLS #ifdefs and move GnuTLS specific functionality into tls_gnutls.c. --- libvncclient/sockets.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'libvncclient/sockets.c') 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)); -- cgit v1.2.3