Commit 9ec36a65 authored by dscho's avatar dscho

select exceptfds

parent 45a4b4a2
...@@ -188,7 +188,7 @@ rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec) ...@@ -188,7 +188,7 @@ rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec)
memcpy((char *)&fds, (char *)&(rfbScreen->allFds), sizeof(fd_set)); memcpy((char *)&fds, (char *)&(rfbScreen->allFds), sizeof(fd_set));
tv.tv_sec = 0; tv.tv_sec = 0;
tv.tv_usec = usec; tv.tv_usec = usec;
nfds = select(rfbScreen->maxFd + 1, &fds, NULL, NULL, &tv); nfds = select(rfbScreen->maxFd + 1, &fds, NULL, &fds, &tv);
if (nfds == 0) { if (nfds == 0) {
return; return;
} }
...@@ -451,7 +451,7 @@ WriteExact(cl, buf, len) ...@@ -451,7 +451,7 @@ WriteExact(cl, buf, len)
FD_SET(sock, &fds); FD_SET(sock, &fds);
tv.tv_sec = 5; tv.tv_sec = 5;
tv.tv_usec = 0; tv.tv_usec = 0;
n = select(sock+1, NULL, &fds, NULL, &tv); n = select(sock+1, NULL, &fds, &fds, &tv);
if (n < 0) { if (n < 0) {
rfbLogPerror("WriteExact: select"); rfbLogPerror("WriteExact: select");
UNLOCK(cl->outputMutex); UNLOCK(cl->outputMutex);
......
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