summaryrefslogtreecommitdiffstats
path: root/libvncclient
diff options
context:
space:
mode:
authorTobias Junghans <tobydox@veyon.io>2018-11-06 10:36:36 +0100
committerTobias Junghans <tobydox@veyon.io>2018-11-06 10:36:36 +0100
commit9f5116eb538491c181bfd845efe9333ef5b5376d (patch)
treea129ca2dfc83c82250f33571ec3dca3b6e9d2679 /libvncclient
parent66ead2a7f23a30b4f441c18f5d884ea398055391 (diff)
downloadlibtdevnc-9f5116eb538491c181bfd845efe9333ef5b5376d.tar.gz
libtdevnc-9f5116eb538491c181bfd845efe9333ef5b5376d.zip
LibVNCClient: pass buffer as const to WriteToTLS()
Diffstat (limited to 'libvncclient')
-rw-r--r--libvncclient/tls.h2
-rw-r--r--libvncclient/tls_gnutls.c2
-rw-r--r--libvncclient/tls_none.c2
-rw-r--r--libvncclient/tls_openssl.c2
4 files changed, 4 insertions, 4 deletions
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;