summaryrefslogtreecommitdiffstats
path: root/rfbserver.c
diff options
context:
space:
mode:
authordscho <dscho>2001-09-29 14:55:25 +0000
committerdscho <dscho>2001-09-29 14:55:25 +0000
commit58031bcb768f927d18ce7f781feff528855eefbd (patch)
tree540e869b70b30c8aef5db7e6d5000724cddcf4d3 /rfbserver.c
parent25697e82162be3ebd449ba0eaca61e26916ee95d (diff)
downloadlibtdevnc-58031bcb768f927d18ce7f781feff528855eefbd.tar.gz
libtdevnc-58031bcb768f927d18ce7f781feff528855eefbd.zip
more pthread debugging
Diffstat (limited to 'rfbserver.c')
-rw-r--r--rfbserver.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/rfbserver.c b/rfbserver.c
index 64fa670..2d68e08 100644
--- a/rfbserver.c
+++ b/rfbserver.c
@@ -260,7 +260,10 @@ rfbClientConnectionGone(cl)
rfbClientPtr cl;
{
int i;
+
#ifdef HAVE_PTHREADS
+ pthread_mutex_lock(&cl->updateMutex);
+ pthread_mutex_lock(&cl->outputMutex);
pthread_mutex_lock(&rfbClientListMutex);
#endif
@@ -289,10 +292,6 @@ rfbClientConnectionGone(cl)
if (cl->next)
cl->next->prev = cl->prev;
-#ifdef HAVE_PTHREADS
- pthread_mutex_unlock(&rfbClientListMutex);
-#endif
-
sraRgnDestroy(cl->modifiedRegion);
rfbPrintStats(cl);
@@ -300,6 +299,10 @@ rfbClientConnectionGone(cl)
if (cl->translateLookupTable) free(cl->translateLookupTable);
#ifdef HAVE_PTHREADS
+ pthread_mutex_unlock(&rfbClientListMutex);
+#endif
+
+#ifdef HAVE_PTHREADS
pthread_cond_destroy(&cl->updateCond);
pthread_mutex_destroy(&cl->updateMutex);
pthread_mutex_destroy(&cl->outputMutex);
@@ -839,8 +842,9 @@ rfbSendFramebufferUpdate(cl, updateRegion)
if (!cl->screen->cursorIsDrawn && cl->cursorWasChanged)
sendCursorShape = TRUE;
} else {
- if (!cl->screen->cursorIsDrawn)
+ if (!cl->screen->cursorIsDrawn) {
rfbDrawCursor(cl);
+ }
}
/*