summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authordscho <dscho>2001-10-10 15:07:17 +0000
committerdscho <dscho>2001-10-10 15:07:17 +0000
commitfad7881732f39780fecd0a0c678392f002b88e26 (patch)
treee04eb7c43100a2eefd51222fb15550b289c882dd /main.c
parent631d3be5408c9b487bb75ecc25177de4901b71d5 (diff)
downloadlibtdevnc-fad7881732f39780fecd0a0c678392f002b88e26.tar.gz
libtdevnc-fad7881732f39780fecd0a0c678392f002b88e26.zip
pthreads corrections
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/main.c b/main.c
index d1e1797..ea85123 100644
--- a/main.c
+++ b/main.c
@@ -85,17 +85,15 @@ void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,in
/* while(!sraRgnEmpty(cl->copyRegion)) */ {
#ifdef HAVE_PTHREADS
- if(cl->screen->backgroundLoop) {
- SIGNAL(cl->updateCond);
- UNLOCK(cl->updateMutex);
- LOCK(cl->updateMutex);
- } else
+ if(!cl->screen->backgroundLoop)
#endif
{
sraRegionPtr updateRegion = sraRgnCreateRgn(cl->modifiedRegion);
sraRgnOr(updateRegion,cl->copyRegion);
+ UNLOCK(cl->updateMutex);
rfbSendFramebufferUpdate(cl,updateRegion);
sraRgnDestroy(updateRegion);
+ continue;
}
}
} else {
@@ -525,7 +523,11 @@ void rfbScreenCleanup(rfbScreenInfoPtr rfbScreen)
free(rfbScreen);
}
+#ifdef HAVE_PTHREADS
+void rfbInitServerWithPthreads(rfbScreenInfoPtr rfbScreen)
+#else
void rfbInitServer(rfbScreenInfoPtr rfbScreen)
+#endif
{
#ifdef WIN32
WSADATA trash;