summaryrefslogtreecommitdiffstats
path: root/client_examples
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2009-10-21 19:02:46 +0200
committerJohannes Schindelin <johannes.schindelin@gmx.de>2009-10-30 18:28:59 +0100
commit3b608cd39b0f335658dc56525d1d099722d27333 (patch)
tree9cd970c955f8e188d5a6801dcc2dc34c5a0cf03f /client_examples
parent487732981204999a4ca4be7ebfc565cd64e4bf92 (diff)
downloadlibtdevnc-3b608cd39b0f335658dc56525d1d099722d27333.tar.gz
libtdevnc-3b608cd39b0f335658dc56525d1d099722d27333.zip
SDLvncviewer: make listen mode work _somewhat_.
set the port to listen on and really ensure that the window of the fork()ed instance is closed. works somewhat: it's now actually possible to listen for an incoming connection and to close it again, but the second connection attempt fails with 'XIO: fatal IO error 11 (Resource temporarily unavailable)'. this could relate to the fact that SDL uses threads internally and we're fork()ing here... Signed-off-by: Christian Beier <dontmind@freeshell.org> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'client_examples')
-rw-r--r--client_examples/SDLvncviewer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/client_examples/SDLvncviewer.c b/client_examples/SDLvncviewer.c
index a0fd1d9..8909b03 100644
--- a/client_examples/SDLvncviewer.c
+++ b/client_examples/SDLvncviewer.c
@@ -471,6 +471,7 @@ int main(int argc,char** argv) {
SDL_EnableUNICODE(1);
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY,
SDL_DEFAULT_REPEAT_INTERVAL);
+ atexit(SDL_Quit);
/* 16-bit: cl=rfbGetClient(5,3,2); */
cl=rfbGetClient(8,3,4);
@@ -480,6 +481,7 @@ int main(int argc,char** argv) {
cl->HandleKeyboardLedState=kbd_leds;
cl->HandleTextChat=text_chat;
cl->GotXCutText = got_selection;
+ cl->listenPort = LISTEN_PORT_OFFSET;
if(!rfbInitClient(cl,&argc,argv))
return 1;