Commit f40b0111 authored by runge's avatar runge

Add locks of updateMutex in rfbRedrawAfterHideCursor() and

rfbSetClientColourMap().  Up listen limit from 5 to 32.
parent a8453eea
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment