Commit 3b608cd3 authored by Christian Beier's avatar Christian Beier Committed by Johannes Schindelin

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: 's avatarChristian Beier <dontmind@freeshell.org>
Signed-off-by: 's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
parent 48773298
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment