aboutsummaryrefslogtreecommitdiffstats
path: root/unix/xserver/hw/vnc
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2017-01-19 15:23:05 +0100
committerPierre Ossman <ossman@cendio.se>2017-01-19 15:23:05 +0100
commit4b35524594d31349c8aaa81593b1be1b1bf4ef4f (patch)
treefe689349e1c3e79870bef68f4fe672142523dd88 /unix/xserver/hw/vnc
parentd5ab3e376f00e4237a90732f1dd0b5c71e0693de (diff)
downloadtigervnc-4b35524594d31349c8aaa81593b1be1b1bf4ef4f.tar.gz
tigervnc-4b35524594d31349c8aaa81593b1be1b1bf4ef4f.zip
Harmonise new client handlers
One was missing a call to register the fd with the X server, and one forgot to set it to non-blocking. One result of this was a crash when hitting the blacklist.
Diffstat (limited to 'unix/xserver/hw/vnc')
-rw-r--r--unix/xserver/hw/vnc/XserverDesktop.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc
index f6e6a7fe..1428791e 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.cc
+++ b/unix/xserver/hw/vnc/XserverDesktop.cc
@@ -443,6 +443,7 @@ bool XserverDesktop::handleListenerEvent(int fd,
sock->outStream().setBlocking(false);
vlog.debug("new client, sock %d", sock->getFd());
sockserv->addSocket(sock);
+ vncSetNotifyFd(sock->getFd(), screenIndex, true, false);
return true;
}
@@ -536,6 +537,7 @@ void XserverDesktop::blockHandler(int* timeout)
void XserverDesktop::addClient(Socket* sock, bool reverse)
{
vlog.debug("new client, sock %d reverse %d",sock->getFd(),reverse);
+ sock->outStream().setBlocking(false);
server->addSocket(sock, reverse);
vncSetNotifyFd(sock->getFd(), screenIndex, true, false);
}