diff options
author | dscho <dscho> | 2005-12-22 00:07:19 +0000 |
---|---|---|
committer | dscho <dscho> | 2005-12-22 00:07:19 +0000 |
commit | e673a125dfb29455ba73965e20defdbd732dc01b (patch) | |
tree | 8f4bda53b0ce87381d4742c3a95559a1ebe86e3d /libvncserver | |
parent | 1c26789eff7b22518fcfb942e3d5a36758fdca19 (diff) | |
download | libtdevnc-e673a125dfb29455ba73965e20defdbd732dc01b.tar.gz libtdevnc-e673a125dfb29455ba73965e20defdbd732dc01b.zip |
make compile again with pthreads; fix off-by-one error
Diffstat (limited to 'libvncserver')
-rw-r--r-- | libvncserver/rfbserver.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index e60aadc..7c620c8 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -435,7 +435,8 @@ rfbClientConnectionGone(rfbClientPtr cl) #endif #ifdef LIBVNCSERVER_HAVE_LIBPTHREAD - if(cl->screen->backgroundLoop != FALSE) + if(cl->screen->backgroundLoop != FALSE) { + int i; do { LOCK(cl->refCountMutex); i=cl->refCount; @@ -443,6 +444,7 @@ rfbClientConnectionGone(rfbClientPtr cl) if(i>0) WAIT(cl->deleteCond,cl->refCountMutex); } while(i>0); + } #endif UNLOCK(rfbClientListMutex); @@ -547,7 +549,7 @@ rfbProcessClientProtocolVersion(rfbClientPtr cl) pv[sz_rfbProtocolVersionMsg] = 0; if (sscanf(pv,rfbProtocolVersionFormat,&major_,&minor_) != 2) { char name[1024]; - if(sscanf(pv,"RFB %03d.%03d %1024s\n",&major_,&minor_,name) != 3) { + if(sscanf(pv,"RFB %03d.%03d %1023s\n",&major_,&minor_,name) != 3) { rfbErr("rfbProcessClientProtocolVersion: not a valid RFB client\n"); rfbCloseClient(cl); return; |