diff options
author | Christian Beier <dontmind@freeshell.org> | 2018-11-07 20:30:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-07 20:30:25 +0100 |
commit | f997b5a75fa171d79c5e568b7157fba83c8d8355 (patch) | |
tree | 8c858680355429a3b1df318124789e17083a53f6 /libvncclient | |
parent | 393e51884616f1e291779392ab33ee2bac338551 (diff) | |
parent | 9f5116eb538491c181bfd845efe9333ef5b5376d (diff) | |
download | libtdevnc-f997b5a75fa171d79c5e568b7157fba83c8d8355.tar.gz libtdevnc-f997b5a75fa171d79c5e568b7157fba83c8d8355.zip |
Merge pull request #261 from veyon/misc-fixes
Misc fixes
Diffstat (limited to 'libvncclient')
-rw-r--r-- | libvncclient/rfbproto.c | 1 | ||||
-rw-r--r-- | libvncclient/sasl.c | 3 | ||||
-rw-r--r-- | libvncclient/sockets.c | 3 | ||||
-rw-r--r-- | libvncclient/tls.h | 2 | ||||
-rw-r--r-- | libvncclient/tls_gnutls.c | 2 | ||||
-rw-r--r-- | libvncclient/tls_none.c | 2 | ||||
-rw-r--r-- | libvncclient/tls_openssl.c | 2 |
7 files changed, 11 insertions, 4 deletions
diff --git a/libvncclient/rfbproto.c b/libvncclient/rfbproto.c index a024bb4..5679b06 100644 --- a/libvncclient/rfbproto.c +++ b/libvncclient/rfbproto.c @@ -1253,6 +1253,7 @@ SetFormatAndEncodings(rfbClient* client) if (!SupportsClient2Server(client, rfbSetEncodings)) return TRUE; se->type = rfbSetEncodings; + se->pad = 0; se->nEncodings = 0; if (client->appData.encodingsString) { diff --git a/libvncclient/sasl.c b/libvncclient/sasl.c index 0530307..db240c1 100644 --- a/libvncclient/sasl.c +++ b/libvncclient/sasl.c @@ -41,6 +41,9 @@ #ifdef WIN32 #undef SOCKET #include <winsock2.h> +#ifdef EWOULDBLOCK +#undef EWOULDBLOCK +#endif #define EWOULDBLOCK WSAEWOULDBLOCK #define socklen_t int #define close closesocket diff --git a/libvncclient/sockets.c b/libvncclient/sockets.c index ed2deef..f042472 100644 --- a/libvncclient/sockets.c +++ b/libvncclient/sockets.c @@ -40,6 +40,9 @@ #ifdef WIN32 #undef SOCKET #include <winsock2.h> +#ifdef EWOULDBLOCK +#undef EWOULDBLOCK +#endif #define EWOULDBLOCK WSAEWOULDBLOCK #define close closesocket #define read(sock,buf,len) recv(sock,buf,len,0) diff --git a/libvncclient/tls.h b/libvncclient/tls.h index a5a2ac6..ffcfdeb 100644 --- a/libvncclient/tls.h +++ b/libvncclient/tls.h @@ -43,7 +43,7 @@ int ReadFromTLS(rfbClient* client, char *out, unsigned int n); * It's a wrapper function over gnutls_record_send() and it will be * blocking call, until all bytes are written or error returned. */ -int WriteToTLS(rfbClient* client, char *buf, unsigned int n); +int WriteToTLS(rfbClient* client, const char *buf, unsigned int n); /* Free TLS resources */ void FreeTLS(rfbClient* client); diff --git a/libvncclient/tls_gnutls.c b/libvncclient/tls_gnutls.c index f146d2a..ec3c450 100644 --- a/libvncclient/tls_gnutls.c +++ b/libvncclient/tls_gnutls.c @@ -589,7 +589,7 @@ ReadFromTLS(rfbClient* client, char *out, unsigned int n) } int -WriteToTLS(rfbClient* client, char *buf, unsigned int n) +WriteToTLS(rfbClient* client, const char *buf, unsigned int n) { unsigned int offset = 0; ssize_t ret; diff --git a/libvncclient/tls_none.c b/libvncclient/tls_none.c index 4dfcb27..d436ce9 100644 --- a/libvncclient/tls_none.c +++ b/libvncclient/tls_none.c @@ -43,7 +43,7 @@ int ReadFromTLS(rfbClient* client, char *out, unsigned int n) } -int WriteToTLS(rfbClient* client, char *buf, unsigned int n) +int WriteToTLS(rfbClient* client, const char *buf, unsigned int n) { rfbClientLog("TLS is not supported.\n"); errno = EINTR; diff --git a/libvncclient/tls_openssl.c b/libvncclient/tls_openssl.c index fe60147..e2fadb2 100644 --- a/libvncclient/tls_openssl.c +++ b/libvncclient/tls_openssl.c @@ -640,7 +640,7 @@ ReadFromTLS(rfbClient* client, char *out, unsigned int n) } int -WriteToTLS(rfbClient* client, char *buf, unsigned int n) +WriteToTLS(rfbClient* client, const char *buf, unsigned int n) { unsigned int offset = 0; ssize_t ret; |