Commit Graph

4 Commits (90abc79efa3d7ca6ac10c5f3bc329ec128008523)

Author SHA1 Message Date
Christian Beier bf2470cec6 Check rfbGetScreen() return value everywhere.
This fixes a segfault when a server is invoked with the
'-help' commandline argument.
14 years ago
Christian Beier 705a5d46e6 Add doxygen documentation support.
Adds automagically generating libvncserver/libvncclient API
    documentation using doxygen. This gives a nice overview on both APIs,
    include dependencies and function call/caller dependencies.

    TODO: Modify all the explaining comments in the .c files for use with
          doxygen as well.

    This patch only changes comments, no functional changes at all!

Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
dscho 951ec26b7c The PseudoEncoding extension code was getting silly:
If the client asked for an encoding, and no enabled extension handled it,
LibVNCServer would walk through all extensions, and if they promised to handle
the encoding, execute the extension's newClient() if it was not NULL.

However, if newClient is not NULL, it will be called when a client connects,
and if it returns TRUE, the extension will be enabled. Since all the state of
the extension should be in the client data, there is no good reason why
newClient should return FALSE the first time (thus not enabling the extension),
but TRUE when called just before calling enablePseudoEncoding().

So in effect, the extension got enabled all the time, even if that was not
necessary.

The resolution is to pass a void** to enablePseudoEncoding. This has the
further advantage that enablePseudoEncoding can remalloc() or free() the
data without problems. Though keep in mind that if enablePseudoEncoding()
is called on a not-yet-enabled extension, the passed data points to NULL.
20 years ago
dscho 11fc700c5d add BackChannel extension example 20 years ago