summaryrefslogtreecommitdiffstats
path: root/libvncserver
diff options
context:
space:
mode:
Diffstat (limited to 'libvncserver')
-rw-r--r--libvncserver/main.c3
-rw-r--r--libvncserver/rfbserver.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/libvncserver/main.c b/libvncserver/main.c
index 3af90ca..52bd4e7 100644
--- a/libvncserver/main.c
+++ b/libvncserver/main.c
@@ -455,12 +455,11 @@ clientOutput(void *data)
haveUpdate = sraRgnAnd(updateRegion,cl->requestedRegion);
sraRgnDestroy(updateRegion);
}
- UNLOCK(cl->updateMutex);
if (!haveUpdate) {
WAIT(cl->updateCond, cl->updateMutex);
- UNLOCK(cl->updateMutex); /* we really needn't lock now. */
}
+ UNLOCK(cl->updateMutex);
}
/* OK, now, to save bandwidth, wait a little while for more
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c
index 0c7f584..434d59d 100644
--- a/libvncserver/rfbserver.c
+++ b/libvncserver/rfbserver.c
@@ -500,9 +500,9 @@ rfbClientConnectionGone(rfbClientPtr cl)
do {
LOCK(cl->refCountMutex);
i=cl->refCount;
- UNLOCK(cl->refCountMutex);
if(i>0)
WAIT(cl->deleteCond,cl->refCountMutex);
+ UNLOCK(cl->refCountMutex);
} while(i>0);
}
#endif