1
0
mirror of https://github.com/KDE/krfb synced 2026-07-01 07:41:17 -07:00
krfb crashed sometimes when the user tried to close a connection. Better
locking in libvncserver and an explicit rfbCloseConnection() invocation
before calling quit() should prevent this.

svn path=/trunk/kdenetwork/krfb/; revision=149689
This commit is contained in:
Tim Jansen
2002-04-15 22:54:48 +00:00
parent ca5b15a389
commit 1ef6160d10
8 changed files with 33 additions and 19 deletions

View File

@@ -56,14 +56,14 @@ static void rfbProcessClientNormalMessage(rfbClientPtr cl);
static void rfbProcessClientInitMessage(rfbClientPtr cl);
#ifdef HAVE_PTHREADS
static void rfbIncrClientRef(rfbClientPtr cl)
void rfbIncrClientRef(rfbClientPtr cl)
{
LOCK(cl->refCountMutex);
cl->refCount++;
UNLOCK(cl->refCountMutex);
}
static void rfbDecrClientRef(rfbClientPtr cl)
void rfbDecrClientRef(rfbClientPtr cl)
{
LOCK(cl->refCountMutex);
cl->refCount--;
@@ -71,6 +71,14 @@ static void rfbDecrClientRef(rfbClientPtr cl)
TSIGNAL(cl->deleteCond);
UNLOCK(cl->refCountMutex);
}
#else
void rfbIncrClientRef(rfbClientPtr cl)
{
}
void rfbDecrClientRef(rfbClientPtr cl)
{
}
#endif
MUTEX(rfbClientListMutex);