diff options
author | Christian Beier <dontmind@freeshell.org> | 2012-04-15 16:50:40 +0200 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2012-04-15 16:50:40 +0200 |
commit | 77286f0831bbff0a3828f1987aa279ae9178619c (patch) | |
tree | e518ca8c4fccdf29eea33829700a3df58bcd3d48 /libvncclient/sockets.c | |
parent | 7bf369a04ba0c5c47097bd62cbcb183fa2c0282e (diff) | |
download | libvncserver-77286f0831bbff0a3828f1987aa279ae9178619c.zip libvncserver-77286f0831bbff0a3828f1987aa279ae9178619c.tar.gz |
LibVNCClient: Remove all those WITH_CLIENT_TLS #ifdefs and move GnuTLS specific functionality into tls_gnutls.c.
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)); |