Commit Graph

159 Commits (c1363fa9583ed41b94fbc79b3ff410b7d5189407)

Author SHA1 Message Date
George Kiagiadakis c1363fa958 Fix memory corruption bug.
This bug occured 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>
14 years ago
George Kiagiadakis 35246edddd Fix compilation in c89 mode.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Christian Beier 62b7acf480 Fix regression in Ultra encoding introduced by commit fe1ca16e9b.
My bad. There we see what the encodings test is good for ;-)
14 years ago
Christian Beier fe1ca16e9b Fix (most) MinGW32 compiler warnings. 14 years ago
Christian Beier 56234cd0b6 Fix remaining compiler warnings. 14 years ago
Christian Beier e832999a58 Set proper file permissions for source files. 14 years ago
Christian Beier cf72a0f7c3 Call WSAGetLastError() everywhere errno is read after a Winsock call.
Winsock does NOT update errno for us, we have fetch the last error
manually using WSAGetLastError().
14 years ago
Christian Beier f5b96e57bf 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:
http://www.oberhumer.com/opensource/lzo/lzonews.php

Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Christian Beier 9f49600787 libvncserver: Make RRE, CoRRE and Ultra encodings thread-safe.
This adds generic before/after encoding buffers to the rfbClient
struct, so there is no need for thread local storage.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Christian Beier 558a58e039 Remove unneeded files concerning CVS.
We have a git repo nowadays and I guess we won't go back to CVS.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Christian Beier ffe30366d6 Put files used by both libs into a 'common' dir.
No functional changes. All files used by _both_ libvncserver and
libvncclient are put into a 'common' directory and references
from other files as well as Autotools and CMake build systems are
updated.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
ebola_rulez 5e1488beb3 Fix two errors found by cppcheck
Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
runge 658bef5fde Remove never used protocol version name string. 14 years ago
Tobias Doerffel d4fabc217e libvncserver sockets: check cl->screen before accessing it
In commit 079394ca5b new code with
insufficient checks was introduced causing a segfault when doing a
HTTP server connection. Such connections have no screen set in the
client data structure.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
14 years ago
Christian Beier a5f8d3a310 libvncserver: fix endless loop when server closed client in threaded mode.
Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Christian Beier 079394ca5b libvncserver sockets: favor per-screen maxclientwait over global one when set.
Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Christian Beier 453645a6ea libvncserver cleanup: remove rfbKeyFrame remnants. 14 years ago
Christian Beier e5523350a8 libvnc[server|client]: implement xvp VNC extension.
This implements the xvp VNC extension, which is described in the
community version of the RFB protocol:
http://tigervnc.sourceforge.net/cgi-bin/rfbproto
It is also mentioned in the official RFB protocol.
15 years ago
Tobias Doerffel 5da7c7a71a Added missing initialization of extension mutex
When not calling rfbRegisterProtocolExtension() the extension mutex
is uninitialized but used upon calling rfbGetExtensionIterator() and
rfbReleaseExtensionIterator() in rfbNewTCPOrUDPClient(). This causes
libvncserver to crash on Win32 when building with thread support.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Signed-off-by: Christian Beier <dontmind@freeshell.org>
15 years ago
Tobias Doerffel 71ad3229f6 In rfbSendDirContent() we have to make sure to call closedir() before
returning. This did not happen if rfbSendFileTransferMessage() failed.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
15 years ago
Christian Beier c0373e9cd4 Non-blocking sockets for Windows.
Expands the SetNonBlocking() function in libvncclient/sockets.c to also
work under Windows and also changes it to honour maybe already present
socket flags.

A similar function was introduced for libvncserver as well and
all the #ifdef'ed fnctl calls replaced with calls to that one.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
15 years ago
Christian Beier 0df84e5c27 Cleanup: remove CORBA stuff.
The header file and most of the functions referred to
do not exist in libvncserver.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
15 years ago
Christian Beier ad25446978 Fix MinGW32 compilation with libjpeg.
MinGW32 (or more exactly, a rpcndr.h file included by
winsock2.h) typedefs a 'boolean' type that jmorecfg.h
included by jpeglib.h also tries to typedef.
So, tell the jpeg headers.

Closes: 3007302
15 years ago
Christian Beier 09f7c684a2 Implement a DisplayFinishedHook for libvncserver.
If set, this hook gets called just before
rfbSendFrameBufferUpdate() returns.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
15 years ago
Christian Beier 07008deea2 libvncserver/font.c: add some checks to rfbDrawChar().
In some cases (bad font data) the coordinates evaluate to <0,
causing a segfault in the following memcpy().

[jes: keep the offset, but do not try to segfault]

Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
runge 69cd710dd2 year++; 15 years ago
runge c15b6165ab tightvnc-filetransfer/rfbtightserver.c: enabled fix
for tight security type for RFB 3.8 (debian bug 517422.)
15 years ago
runge f40b011182 Add locks of updateMutex in rfbRedrawAfterHideCursor() and
rfbSetClientColourMap().  Up listen limit from 5 to 32.
15 years ago
Christian Beier 9ed410668c Fix checks for socket values, 0 is a legal value.
To make this work, we also have to initialize sockets
to a default value of -1.

Also close a client listen socket if it's open.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Vic Lee a4cc897222 Fix various compilation warnings
Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Johannes Schindelin f49a292783 Merge branch 'VeNCrypt' 16 years ago
Vic Lee 29990f0090 Add MSLogon security type
Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
runge 0142acdded Some broken build environments treat fprintf(fh, buf) as a fatal error... 16 years ago
runge 804335f9d2 Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422.
16 years ago
dscho 3d2eab575e clean up build flags
The flag handling (both compiler options and include paths) are a mess at
the moment.  There is no point in forcing "-O2 -g" when these are already
the defaults, and if someone changes the defaults, chances are good they
don't want you clobbering their choices.

The -Wall flag should be handled in configure and thrown into CFLAGS once
rather than every Makefile.am.  Plus, this way we can control which
compilers the flag actually gets used with.

Finally, the INCLUDES variable is for -I paths, not AM_CFLAGS.  Nor should
it contain -I. as this is already in the default includes setup.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
runge dbfa4ad1f7 We seem to need to guard against freeing iterator 'i' twice in rfbSendFramebufferUpdate() (italc reported bug) 17 years ago
runge eaecbf4bec Handle colormaps with more than 256 colors. 17 years ago
dscho c04a28f306 Please MS Visual C++ a bit (Christian Ehrlicher)
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
17 years ago
dscho befcb6fc14 Fix ZYWRLE en/decoding for width != scanline (thanks Noriaki Yamazaki)
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
17 years ago
runge 8bb8271615 Add ZYWRLE to server printout. 17 years ago
runge fe63ea1365 Need to include zywrletemplate.c in Makefile.am 17 years ago
dscho c17aef31ac Fix rfbSendSupportedEncodings
There was a long standing TODO to make the counting of the supported
encodings dynamic.  It never triggered, until ZYWRLE was added.

Noticed by Christian Ehrlicher.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
17 years ago
dscho c5173f364f Fix Swap16IfLE() on bytes
When swapping the values for the colour table to little-endian (because
they are 16-bit values), we need to cast "unsigned char" to "unsigned
short"; otherwise, Microsoft's compiler would keep complaining.

Noticed by Christian Ehrlicher.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
17 years ago
dscho 3d9a563983 Move tightQualityLevel out of the JPEG specific part
The variable tightQualityLevel is used for ZYWRLE compression, too,
so if libjpeg is not present, but libz is, we still need to have
that struct member.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
17 years ago
dscho ce8d6c2409 Make ZYWRLE thread-safe for multiple clients
ZYWRLE used a static buffer, which does not work too well if you have
more than one client in a threaded server.  Instead, we have the data
in the client structure now.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
17 years ago
dscho 5b9b454361 ZYWRLE brown paper bag fix
While adjusting the coding style, three stupid mistakes happened.  The
quality is _not_ just 1, 2, 3, but really 1, 3, 2.  And the macros
ZYWRLE_PACK_COEFF() and ZYWRLE_UNPACK_COEFF() expand to more than one
statement, which means that we need curly brackets around them when they
are in an if clause.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
17 years ago
dscho 87fa3452c1 Add missing #include <time.h> (thanks Christian Ehrlicher)
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
17 years ago
dscho 059afcdf81 Add ZYWRLE server-side support (thanks Noriaki Yamazaki, Hitachi)
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
17 years ago
dscho 1df143d1a1 Avoid misaligned access on 64-bit machines
We used to assume that a char[256] is properly aligned to be cast to
an rfbServerInitMsg, but that was not the case.  So use a union instead.

Noticed by Flavio Leitner.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
18 years ago
runge e9353e8d29 More fixes to ultra java viewer, ultrafilexfer debugging output, fix -loop in .x11vncrc case. 18 years ago