Add locks of updateMutex in rfbRedrawAfterHideCursor() and

rfbSetClientColourMap().  Up listen limit from 5 to 32.
pull/1/head
runge 15 years ago
parent a8453eea8b
commit f40b011182

@ -693,10 +693,13 @@ void rfbRedrawAfterHideCursor(rfbClientPtr cl,sraRegionPtr updateRegion)
if(sraClipRect2(&x,&y,&x2,&y2,0,0,s->width,s->height)) {
sraRegionPtr rect;
rect = sraRgnCreateRect(x,y,x2,y2);
if(updateRegion)
if(updateRegion) {
sraRgnOr(updateRegion,rect);
else
} else {
LOCK(cl->updateMutex);
sraRgnOr(cl->modifiedRegion,rect);
UNLOCK(cl->updateMutex);
}
sraRgnDestroy(rect);
}
}

@ -638,7 +638,7 @@ rfbListenOnTCPPort(int port,
closesocket(sock);
return -1;
}
if (listen(sock, 5) < 0) {
if (listen(sock, 32) < 0) {
closesocket(sock);
return -1;
}

@ -423,6 +423,7 @@ rfbSetClientColourMap(rfbClientPtr cl, int firstColour, int nColours)
}
if (cl->format.trueColour) {
LOCK(cl->updateMutex);
(*rfbInitColourMapSingleTableFns
[BPP2OFFSET(cl->format.bitsPerPixel)]) (&cl->translateLookupTable,
&cl->screen->serverFormat, &cl->format,&cl->screen->colourMap);
@ -430,6 +431,7 @@ rfbSetClientColourMap(rfbClientPtr cl, int firstColour, int nColours)
sraRgnDestroy(cl->modifiedRegion);
cl->modifiedRegion =
sraRgnCreateRect(0,0,cl->screen->width,cl->screen->height);
UNLOCK(cl->updateMutex);
return TRUE;
}

Loading…
Cancel
Save