diff options
author | dscho <dscho> | 2001-09-29 19:51:17 +0000 |
---|---|---|
committer | dscho <dscho> | 2001-09-29 19:51:17 +0000 |
commit | 08ed0461c7abca36fd6a6b0abf7ae466a2e8435a (patch) | |
tree | 36a9db4d83034048feaae920a071a670e6f5bcda /rfbserver.c | |
parent | 641012310eebe3a129c8a1939c3f8c9cd645ef50 (diff) | |
download | libtdevnc-08ed0461c7abca36fd6a6b0abf7ae466a2e8435a.tar.gz libtdevnc-08ed0461c7abca36fd6a6b0abf7ae466a2e8435a.zip |
finally fixed pthreads
Diffstat (limited to 'rfbserver.c')
-rw-r--r-- | rfbserver.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/rfbserver.c b/rfbserver.c index 2d68e08..471a25e 100644 --- a/rfbserver.c +++ b/rfbserver.c @@ -262,8 +262,10 @@ rfbClientConnectionGone(cl) int i; #ifdef HAVE_PTHREADS - pthread_mutex_lock(&cl->updateMutex); - pthread_mutex_lock(&cl->outputMutex); + /* + pthread_mutex_lock(&cl->updateMutex); + pthread_mutex_lock(&cl->outputMutex); + */ pthread_mutex_lock(&rfbClientListMutex); #endif @@ -815,15 +817,15 @@ rfbProcessClientNormalMessage(cl) */ Bool -rfbSendFramebufferUpdate(cl, updateRegion) +rfbSendFramebufferUpdate(cl, givenUpdateRegion) rfbClientPtr cl; - sraRegionPtr updateRegion; + sraRegionPtr givenUpdateRegion; { sraRectangleIterator* i; sraRect rect; int nUpdateRegionRects; rfbFramebufferUpdateMsg *fu = (rfbFramebufferUpdateMsg *)cl->updateBuf; - sraRegionPtr updateCopyRegion; + sraRegionPtr updateRegion,updateCopyRegion; int dx, dy; Bool sendCursorShape = FALSE; Bool cursorWasDrawn = FALSE; @@ -862,8 +864,8 @@ rfbSendFramebufferUpdate(cl, updateRegion) * no update is needed. */ - updateRegion = sraRgnCreateRgn(cl->copyRegion); - sraRgnOr(updateRegion,cl->modifiedRegion); + updateRegion = sraRgnCreateRgn(givenUpdateRegion); + sraRgnOr(updateRegion,cl->copyRegion); if(!sraRgnAnd(updateRegion,cl->requestedRegion) && !sendCursorShape) { sraRgnDestroy(updateRegion); return TRUE; @@ -1209,14 +1211,6 @@ Bool rfbSendUpdateBuf(cl) rfbClientPtr cl; { - /* - int i; - for (i = 0; i < cl->ublen; i++) { - fprintf(stderr,"%02x ",((unsigned char *)cl->updateBuf)[i]); - } - fprintf(stderr,"\n"); - */ - if (WriteExact(cl, cl->updateBuf, cl->ublen) < 0) { rfbLogPerror("rfbSendUpdateBuf: write"); rfbCloseClient(cl); |