mirror of
https://github.com/KDE/krfb
synced 2026-07-01 07:41:17 -07:00
Fix:
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user