on fct_Called MirrorAdjustment.providerSide[all,LeftMirror].Adjust
{
// return the call always only after 2 other calls have been received
const dword nrOfCalls = 3;
long ccHandles[nrOfCalls];
dword nextCallSlot = 0;
dword nrOfCallsReceived = 0;
this.Result = Mirrors::AdjustResult::OK;
this.DeferAnswer();
ccHandles[nextCallSlot] = this.CreatePermanentHandle();
nextCallSlot = (nextCallSlot + 1) % nrOfCalls;
if (++nrOfCallsReceived >= nrOfCalls)
{
callContext * cco;
dword returnSlot;
returnSlot = nrOfCallsReceived % nrOfCalls;
cco = cco::FromHandle(ccHandles[returnSlot]);
cco.ReturnCall();
cco::ReleaseHandle(ccHandles[returnSlot]);
}
}