From 3b608cd39b0f335658dc56525d1d099722d27333 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Wed, 21 Oct 2009 19:02:46 +0200 Subject: 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 Signed-off-by: Johannes Schindelin --- client_examples/SDLvncviewer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'client_examples/SDLvncviewer.c') 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; -- cgit v1.2.3