From: Derrick Brashear Date: Wed, 18 Aug 2004 23:46:37 +0000 (+0000) Subject: attachserverproc-dont-dequeue-if-not-in-queue-take-two-20040818 X-Git-Tag: BP-disconnected~281 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=399785acf166dac15123889c28974ff06d6d2de0;p=packages%2Fo%2Fopenafs.git attachserverproc-dont-dequeue-if-not-in-queue-take-two-20040818 nWaiting ended up negative, because the dequeuer (GetCall) decremented. --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 303c81bfa..4281cc80a 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -3996,11 +3996,12 @@ rxi_AttachServerProc(register struct rx_call *call, if (call->flags & RX_CALL_WAIT_PROC) { /* Conservative: I don't think this should happen */ call->flags &= ~RX_CALL_WAIT_PROC; - MUTEX_ENTER(&rx_stats_mutex); - rx_nWaiting--; - MUTEX_EXIT(&rx_stats_mutex); - if (queue_IsOnQueue(call)) - queue_Remove(call); + if (queue_IsOnQueue(call)) { + queue_Remove(call); + MUTEX_ENTER(&rx_stats_mutex); + rx_nWaiting--; + MUTEX_EXIT(&rx_stats_mutex); + } } call->state = RX_STATE_ACTIVE; call->mode = RX_MODE_RECEIVING;