From: Jeffrey Altman Date: Thu, 25 Sep 2008 21:17:22 +0000 (+0000) Subject: rx-clear-queues-correctly-20080925 X-Git-Tag: openafs-devel-1_5_61~793 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=8b50c9d9e3d181f749d0982f57410a5b4906627c;p=packages%2Fo%2Fopenafs.git rx-clear-queues-correctly-20080925 LICENSE IPL10 don't potentially leak packets by leaving them behind and initing queues; in fact, if you are cleaning up there is no need to init queues anyway. --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 98dded051..6163c44d9 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -1282,7 +1282,7 @@ rx_NewCall(register struct rx_connection *conn) rxi_WaitforTQBusy(call); if (call->flags & RX_CALL_TQ_CLEARME) { rxi_ClearTransmitQueue(call, 1); - queue_Init(&call->tq); + /*queue_Init(&call->tq);*/ } MUTEX_EXIT(&call->lock); #endif /* AFS_GLOBAL_RXLOCK_KERNEL */ @@ -2235,7 +2235,7 @@ rxi_NewCall(register struct rx_connection *conn, register int channel) /* Now, if TQ wasn't cleared earlier, do it now. */ if (call->flags & RX_CALL_TQ_CLEARME) { rxi_ClearTransmitQueue(call, 1); - queue_Init(&call->tq); + /*queue_Init(&call->tq);*/ } #endif /* AFS_GLOBAL_RXLOCK_KERNEL */ /* Bind the call to its connection structure */ @@ -2244,7 +2244,7 @@ rxi_NewCall(register struct rx_connection *conn, register int channel) } else { call = (struct rx_call *)rxi_Alloc(sizeof(struct rx_call)); - rx_MutexIncrement(rx_stats.nFreeCallStructs, rx_stats_mutex); + rx_MutexIncrement(rx_stats.nCallStructs, rx_stats_mutex); MUTEX_EXIT(&rx_freeCallQueue_lock); MUTEX_INIT(&call->lock, "call lock", MUTEX_DEFAULT, NULL); MUTEX_ENTER(&call->lock); diff --git a/src/rx/rx_rdwr.c b/src/rx/rx_rdwr.c index 14171447a..22149af70 100644 --- a/src/rx/rx_rdwr.c +++ b/src/rx/rx_rdwr.c @@ -728,7 +728,7 @@ rxi_WriteProc(register struct rx_call *call, register char *buf, RX_CALL_FAST_RECOVER_WAIT))) { rxi_Start(0, call, 0, 0); } - } else else if (cp) { + } else if (cp) { cp->flags &= ~RX_PKTFLAG_CP; rxi_FreePacket(cp); cp = call->currentPacket = (struct rx_packet *)0;