--- In [email protected], "John Matthews" <jm5...@...> wrote: > > --- In [email protected], Ravi Mishra <ravicse04@> wrote: > > > > for (delIndex = rachQIndex; delIndex < rachTxQueue->n; delIndex++) { > > rachTxQueue->queue[(delIndex + rachTxQueue->start) % > > (petMaxUEInstancePerProcess+1)] > > = rachTxQueue->queue[(delIndex + rachTxQueue->start + 1) % > > (petMaxUEInstancePerProcess+1)]; > > } > > rachTxQueue->n--; > > If the queue is 0..n-1 then delIndex should be a maximum of n-2 ie. it should > be: > > for (delIndex = rachQIndex; delIndex < rachTxQueue->n - 1; delIndex++) { > > or you could decrement rachTxQueue->n before the loop.
Also, rachQIndex should *not* be incremented at the end of the loop if the UE is deleted (this is probably what's causing the crash).
