--------------------- PatchSet 116 Date: 2002/11/01 21:41:22 Author: rbcollins Branch: esi Tag: (none) Log: introduce more methods Members: src/ESI.cc:1.1.2.24->1.1.2.25 Index: squid3/src/ESI.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ESI.cc,v retrieving revision 1.1.2.24 retrieving revision 1.1.2.25 diff -u -r1.1.2.24 -r1.1.2.25 --- squid3/src/ESI.cc 1 Nov 2002 21:37:55 -0000 1.1.2.24 +++ squid3/src/ESI.cc 1 Nov 2002 21:41:22 -0000 1.1.2.25 @@ -1,6 +1,6 @@ /* - * $Id: ESI.cc,v 1.1.2.24 2002/11/01 21:37:55 rbcollins Exp $ + * $Id: ESI.cc,v 1.1.2.25 2002/11/01 21:41:22 rbcollins Exp $ * * DEBUG: section 86 ESI processing * AUTHOR: Robert Collins @@ -437,7 +437,7 @@ static void Free(void *); - void fail (clientStreamNode *thisNode, clientHttpRequest *http); + void fail (); private: void freeResources(); }; @@ -508,7 +508,7 @@ * and when we come here we have sent data to the client */ if (context->pos == 0) - context->fail (context->thisNode, context->http); + context->fail (); --context->flags.kicked; return ESI_KICK_FAILED; } @@ -1448,10 +1448,8 @@ /* This can ONLY be used before we have sent *any* data to the client */ void -esiContext::fail (clientStreamNode *thisNode, clientHttpRequest *http) +esiContext::fail () { - ErrorState *err; - size_t errorprogress; /* check preconditions */ assert (pos == 0); /* cleanup current state */ @@ -1459,16 +1457,16 @@ /* Stop altering thisNode request */ flags.oktosend = 1; flags.finished = 1; - /* don't honour range requests - for errors we sent it all */ + /* don't honour range requests - for errors we send it all */ flags.error = 1; /* create an error object */ - err = clientBuildError(errorpage, errorstatus, NULL, + ErrorState * err = clientBuildError(errorpage, errorstatus, NULL, http->conn ? &http->conn->peer.sin_addr : &no_addr, http->request); err->err_msg = errormessage; errormessage = NULL; rep = errorBuildReply (err); assert (rep->body.mb.size >= 0); - errorprogress = rep->body.mb.size; + size_t errorprogress = rep->body.mb.size; /* Tell esiSend where to start sending from */ outbound_offset = 0; /* copy the membuf from the reply to outbound */ @@ -1490,7 +1488,8 @@ outboundtail->len = amount; errorprogress += amount; } - /* the esiCode now thinks that the error is the outbound, and all processing has finished. */ + /* the esiCode now thinks that the error is the outbound, + * and all processing has finished. */ /* Send as much as we can */ assert (esiSend (thisNode, this, http)); /* don't cancel anything. The stream nodes will clean up after