really fixed ClientConnectionGone problem

pull/1/head
dscho 22 years ago
parent 47c481b7ca
commit 1e4c2e7369

@ -1,3 +1,5 @@
fixed LinuxVNC colour handling
fixed a bug with pthreads where the connection was not closed
moved vncterm to main package (LinuxVNC included) moved vncterm to main package (LinuxVNC included)
portability fixes (IRIX, OSX, Solaris) portability fixes (IRIX, OSX, Solaris)
more portable way to determine endianness and types of a given size more portable way to determine endianness and types of a given size

@ -408,14 +408,14 @@ rfbClientConnectionGone(cl)
#endif #endif
#ifdef HAVE_LIBPTHREAD #ifdef HAVE_LIBPTHREAD
LOCK(cl->refCountMutex); if(cl->screen->backgroundLoop != FALSE)
if(cl->refCount) { do {
UNLOCK(cl->refCountMutex); LOCK(cl->refCountMutex);
if(cl->screen->backgroundLoop != FALSE) i=cl->refCount;
WAIT(cl->deleteCond,cl->refCountMutex); UNLOCK(cl->refCountMutex);
} else { if(i>0)
UNLOCK(cl->refCountMutex); WAIT(cl->deleteCond,cl->refCountMutex);
} } while(i>0);
#endif #endif
if(cl->sock>=0) if(cl->sock>=0)

Loading…
Cancel
Save