From 7af0397d58747f3b5693311088eaa714cc2d1a76 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Mon, 16 Aug 2010 17:45:06 -0600 Subject: [PATCH] Examining the previous change I see that it will introduce a race condition when circuits are being created and destroyed at close to the same instant in time. See revision 11786 of cac.cpp which fixes mantis 334 if you are interested in what this code does. After running the regression tests, I pushed in a fix (which is removing above mentioned change and restoring the increment of iiuExistenceCount in cac::findOrCreateVirtCircuit. --- src/ca/cac.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ca/cac.cpp b/src/ca/cac.cpp index 149cfd9bc..93de57480 100644 --- a/src/ca/cac.cpp +++ b/src/ca/cac.cpp @@ -286,7 +286,6 @@ cac::~cac () // // shutdown all tcp circuits // - this->iiuExistenceCount = this->circuitList.count(); tsDLIter < tcpiiu > iter = this->circuitList.firstIter (); while ( iter.valid() ) { // this causes a clean shutdown to occur @@ -544,6 +543,7 @@ bool cac::findOrCreateVirtCircuit ( } this->serverTable.add ( *pnewiiu ); this->circuitList.add ( *pnewiiu ); + this->iiuExistenceCount++; pBHE->registerIIU ( guard, *pnewiiu ); piiu = pnewiiu.release (); newIIU = true;