summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2016-12-30 17:54:25 +0100
committerChristian Beier <dontmind@freeshell.org>2016-12-30 17:54:25 +0100
commit16cf35b2bf7b38784b384f1982c7f65bd3fc0142 (patch)
tree543b61db8aa9eb8e4ed9ebd1273c3eb85b745b27
parentb7a7c4d120d145e11af0f3860e14be02e977d30d (diff)
downloadlibtdevnc-16cf35b2bf7b38784b384f1982c7f65bd3fc0142.tar.gz
libtdevnc-16cf35b2bf7b38784b384f1982c7f65bd3fc0142.zip
Use unprefixed b64_* functions in websockets code.
-rw-r--r--libvncserver/websockets.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libvncserver/websockets.c b/libvncserver/websockets.c
index bdec8f3..c9ee1e9 100644
--- a/libvncserver/websockets.c
+++ b/libvncserver/websockets.c
@@ -194,7 +194,7 @@ static void webSocketsGenSha1Key(char *target, int size, char *key)
iov[1].iov_base = GUID;
iov[1].iov_len = sizeof(GUID) - 1;
digestsha1(iov, 2, hash);
- if (-1 == __b64_ntop(hash, sizeof(hash), target, size))
+ if (-1 == b64_ntop(hash, sizeof(hash), target, size))
rfbErr("b64_ntop failed\n");
}
@@ -501,7 +501,7 @@ webSocketsEncodeHixie(rfbClientPtr cl, const char *src, int len, char **dst)
ws_ctx_t *wsctx = (ws_ctx_t *)cl->wsctx;
wsctx->codeBufEncode[sz++] = '\x00';
- len = __b64_ntop((unsigned char *)src, len, wsctx->codeBufEncode+sz, sizeof(wsctx->codeBufEncode) - (sz + 1));
+ len = b64_ntop((unsigned char *)src, len, wsctx->codeBufEncode+sz, sizeof(wsctx->codeBufEncode) - (sz + 1));
if (len < 0) {
return len;
}
@@ -612,7 +612,7 @@ webSocketsDecodeHixie(rfbClientPtr cl, char *dst, int len)
/* Decode the rest of what we need */
buf[needlen] = '\x00'; /* Replace end marker with end of string */
/* rfbLog("buf: %s\n", buf); */
- n = __b64_pton(buf, (unsigned char *)dst+retlen, 2+len);
+ n = b64_pton(buf, (unsigned char *)dst+retlen, 2+len);
if (n < len) {
rfbErr("Base64 decode error\n");
errno = EIO;
@@ -752,7 +752,7 @@ webSocketsDecodeHybi(rfbClientPtr cl, char *dst, int len)
errno = ECONNRESET;
break;
case WS_OPCODE_TEXT_FRAME:
- if (-1 == (flength = __b64_pton(payload, (unsigned char *)wsctx->codeBufDecode, sizeof(wsctx->codeBufDecode)))) {
+ if (-1 == (flength = b64_pton(payload, (unsigned char *)wsctx->codeBufDecode, sizeof(wsctx->codeBufDecode)))) {
rfbErr("%s: Base64 decode error; %m\n", __func__);
break;
}
@@ -826,7 +826,7 @@ webSocketsEncodeHybi(rfbClientPtr cl, const char *src, int len, char **dst)
}
if (wsctx->base64) {
- if (-1 == (ret = __b64_ntop((unsigned char *)src, len, wsctx->codeBufEncode + sz, sizeof(wsctx->codeBufEncode) - sz))) {
+ if (-1 == (ret = b64_ntop((unsigned char *)src, len, wsctx->codeBufEncode + sz, sizeof(wsctx->codeBufEncode) - sz))) {
rfbErr("%s: Base 64 encode failed\n", __func__);
} else {
if (ret != blen)