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>
pull/1/head
Christian Beier 15 years ago committed by Johannes Schindelin
parent 4877329812
commit 3b608cd39b

@ -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;

Loading…
Cancel
Save