[Click] Problem with Queue element
Eddie Kohler
kohler at cs.ucla.edu
Mon Apr 3 03:05:12 EDT 2006
_tail points one past the last element in the queue, as you can tell from this:
> if (next != _head) {
> _q[_tail] = p;
> _tail = next;
So it does no good to stick something in the slot labeled _tail, as you do here:
> else {
> _q[packet_drop]->kill();
> for (int i = packet_drop; next_i(i) != _tail; i =
> next_i(i)){
> _q[i] = _q[next_i(i)];
> }
> _q[_tail] = p;
> }
You want _q[prev_i(_tail)]
E
> }
> }
>
>
> Can anyone see why this problem is occuring????
>
> Any help or advice would be greatly appreciated.
>
> Thanks
>
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
More information about the click
mailing list