Commit 7c9ef637 authored by dscho's avatar dscho

Merge pull request #16 from sandsmark/master

Merge patches from KDE/krfb
parents 42768640 012594b9
...@@ -1061,10 +1061,13 @@ void rfbShutdownServer(rfbScreenInfoPtr screen,rfbBool disconnectClients) { ...@@ -1061,10 +1061,13 @@ void rfbShutdownServer(rfbScreenInfoPtr screen,rfbBool disconnectClients) {
if(disconnectClients) { if(disconnectClients) {
rfbClientPtr cl; rfbClientPtr cl;
rfbClientIteratorPtr iter = rfbGetClientIterator(screen); rfbClientIteratorPtr iter = rfbGetClientIterator(screen);
while( (cl = rfbClientIteratorNext(iter)) ) while( (cl = rfbClientIteratorNext(iter)) ) {
if (cl->sock > -1) if (cl->sock > -1) {
/* we don't care about maxfd here, because the server goes away */ /* we don't care about maxfd here, because the server goes away */
rfbCloseClient(cl); rfbCloseClient(cl);
rfbClientConnectionGone(cl);
}
}
rfbReleaseClientIterator(iter); rfbReleaseClientIterator(iter);
} }
......
...@@ -122,8 +122,9 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen) ...@@ -122,8 +122,9 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen)
{ {
in_addr_t iface = rfbScreen->listenInterface; in_addr_t iface = rfbScreen->listenInterface;
if (rfbScreen->socketState!=RFB_SOCKET_INIT) if (rfbScreen->socketState == RFB_SOCKET_READY) {
return; return;
}
rfbScreen->socketState = RFB_SOCKET_READY; rfbScreen->socketState = RFB_SOCKET_READY;
......
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