summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordscho <johannes.schindelin@gmx.de>2014-08-16 16:20:55 +0200
committerdscho <johannes.schindelin@gmx.de>2014-08-16 16:20:55 +0200
commit7c9ef6372d3ce2942fe78e853c611e269f68eb69 (patch)
tree126209bfc8465e17a6d663e1276d544beaa695f5
parent4276864096382f09f13021670dc67b695c92ddf8 (diff)
parent012594b970b07c212eaf48ed22333a9d37d017a4 (diff)
downloadlibvncserver-7c9ef6372d3ce2942fe78e853c611e269f68eb69.zip
libvncserver-7c9ef6372d3ce2942fe78e853c611e269f68eb69.tar.gz
Merge pull request #16 from sandsmark/master
Merge patches from KDE/krfb
-rw-r--r--libvncserver/main.c11
-rw-r--r--libvncserver/sockets.c5
2 files changed, 10 insertions, 6 deletions
diff --git a/libvncserver/main.c b/libvncserver/main.c
index 4cb18ac..b8cdde1 100644
--- a/libvncserver/main.c
+++ b/libvncserver/main.c
@@ -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)
- /* we don't care about maxfd here, because the server goes away */
- rfbCloseClient(cl);
+ 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);
}
diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c
index ddd8450..d2f814b 100644
--- a/libvncserver/sockets.c
+++ b/libvncserver/sockets.c
@@ -122,8 +122,9 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen)
{
in_addr_t iface = rfbScreen->listenInterface;
- if (rfbScreen->socketState!=RFB_SOCKET_INIT)
- return;
+ if (rfbScreen->socketState == RFB_SOCKET_READY) {
+ return;
+ }
rfbScreen->socketState = RFB_SOCKET_READY;
OpenPOWER on IntegriCloud