summaryrefslogtreecommitdiffstats
path: root/libvncserver/ws_decode.c
diff options
context:
space:
mode:
authorJocelyn Le Sage <jocelyn@le-sage.com>2017-02-21 06:36:15 -0500
committerJocelyn Le Sage <jocelyn.lesage@hpe.com>2017-06-13 06:24:10 -0400
commite8a1ca20352f14bf3b527bb1f148610fc1fb5247 (patch)
tree40a87d260b041f2d8f7ed12e5b1bf2f4b9ecc62e /libvncserver/ws_decode.c
parentada4b4fc5a27eb733c1eaad9d5bce42930e0f4ed (diff)
downloadlibtdevnc-e8a1ca20352f14bf3b527bb1f148610fc1fb5247.tar.gz
libtdevnc-e8a1ca20352f14bf3b527bb1f148610fc1fb5247.zip
Fixed compilation of websockets on system where there is no implementation of base64 functions.
Diffstat (limited to 'libvncserver/ws_decode.c')
-rw-r--r--libvncserver/ws_decode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libvncserver/ws_decode.c b/libvncserver/ws_decode.c
index 513fd4b..441ebc7 100644
--- a/libvncserver/ws_decode.c
+++ b/libvncserver/ws_decode.c
@@ -1,4 +1,5 @@
#include "ws_decode.h"
+#include "base64.h"
#include <string.h>
#include <errno.h>
@@ -432,7 +433,7 @@ hybiReadAndDecode(ws_ctx_t *wsctx, char *dst, int len, int *sockRet, int nInBuf)
case WS_OPCODE_TEXT_FRAME:
data[toReturn] = '\0';
ws_dbg("Initiate Base64 decoding in %p with max size %d and '\\0' at %p\n", data, bufsize, data + toReturn);
- if (-1 == (wsctx->readlen = b64_pton((char *)data, data, bufsize))) {
+ if (-1 == (wsctx->readlen = rfbBase64PtoN((char *)data, data, bufsize))) {
rfbErr("%s: Base64 decode error; %s\n", __func__, strerror(errno));
}
wsctx->writePos = hybiPayloadStart(wsctx);