--------------------- PatchSet 447 Date: 2002/12/20 23:22:33 Author: rbcollins Branch: esi Tag: (none) Log: some choose makecacheable logic Members: src/ESI.cc:1.1.2.60->1.1.2.61 Index: squid3/src/ESI.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ESI.cc,v retrieving revision 1.1.2.60 retrieving revision 1.1.2.61 diff -u -r1.1.2.60 -r1.1.2.61 --- squid3/src/ESI.cc 20 Dec 2002 22:36:54 -0000 1.1.2.60 +++ squid3/src/ESI.cc 20 Dec 2002 23:22:33 -0000 1.1.2.61 @@ -1,6 +1,6 @@ /* - * $Id: ESI.cc,v 1.1.2.60 2002/12/20 22:36:54 rbcollins Exp $ + * $Id: ESI.cc,v 1.1.2.61 2002/12/20 23:22:33 rbcollins Exp $ * * DEBUG: section 86 ESI processing * AUTHOR: Robert Collins @@ -397,6 +397,7 @@ ESIElement::Pointer otherwise; private: static MemPool *Pool; + esiChoose(esiChoose const &); esiTreeParentPtr parent; void checkValidSource (ESIElement::Pointer source) const; }; @@ -2132,6 +2133,10 @@ { flags.dovars = old.flags.dovars; parent = NULL; + elements = NULL; + elementcount = 0; + allocedcount = 0; + allocedsize = 0; for (int counter = 0; counter < old.elementcount; ++counter) assert (addElement(old.elements[counter]->makeCacheable())); @@ -3417,11 +3422,21 @@ parent->provideData (data, this); } +esiChoose::esiChoose(esiChoose const &old) : chosenelement(-1), otherwise (old.otherwise->makeCacheable()), parent (NULL) +{ + elements = NULL; + elementcount = 0; + allocedcount = 0; + allocedsize = 0; + + for (int counter = 0; counter < old.elementcount; ++counter) + assert (addElement(old.elements[counter]->makeCacheable())); +} + ESIElement::Pointer esiChoose::makeCacheable() const { - fatal ("esiChoose not implemented\n"); - return NULL; + return new esiChoose (*this); } /* esiWhen */