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