]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
rx-clear-queues-correctly-20080925
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 25 Sep 2008 21:17:22 +0000 (21:17 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 25 Sep 2008 21:17:22 +0000 (21:17 +0000)
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.

src/rx/rx.c
src/rx/rx_rdwr.c

index 98dded051d3431375a0c1586f622d551824313e2..6163c44d9229e7d3c954e4dc7dcff129f8a2654e 100644 (file)
@@ -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);
index 14171447af58d8c085049eb68607bc66192164e4..22149af70197bf6e1b9712ba35ec83000bfa50bd 100644 (file)
@@ -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;