STABLE14-attachserverproc-dont-dequeue-if-not-in-queue-take-two-20040818

nWaiting ended up negative, because the dequeuer (GetCall) decremented.


(cherry picked from commit 399785acf1)
This commit is contained in:
Derrick Brashear 2004-08-25 08:13:09 +00:00
parent 55c8e616eb
commit 5b60572c5d

View File

@ -4009,11 +4009,12 @@ rxi_AttachServerProc(register struct rx_call *call,
if (call->flags & RX_CALL_WAIT_PROC) { if (call->flags & RX_CALL_WAIT_PROC) {
/* Conservative: I don't think this should happen */ /* Conservative: I don't think this should happen */
call->flags &= ~RX_CALL_WAIT_PROC; call->flags &= ~RX_CALL_WAIT_PROC;
MUTEX_ENTER(&rx_stats_mutex); if (queue_IsOnQueue(call)) {
rx_nWaiting--; queue_Remove(call);
MUTEX_EXIT(&rx_stats_mutex); MUTEX_ENTER(&rx_stats_mutex);
if (queue_IsOnQueue(call)) rx_nWaiting--;
queue_Remove(call); MUTEX_EXIT(&rx_stats_mutex);
}
} }
call->state = RX_STATE_ACTIVE; call->state = RX_STATE_ACTIVE;
call->mode = RX_MODE_RECEIVING; call->mode = RX_MODE_RECEIVING;