From: Alex Rousskov Date: Mon, 27 Sep 2010 18:42:05 +0000 (-0600) Subject: Cleanup: Remove old_rep2 from clientReplyContext::handleIMSReply(). X-Git-Tag: take1~227 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4802f60d1e013619b1d7d194dcf5d540bbe5042c;p=thirdparty%2Fsquid.git Cleanup: Remove old_rep2 from clientReplyContext::handleIMSReply(). StoreEntry::getReply() returns pointer to HttpReply that belongs to MemObject. It does not create a new object. Hence, outer old_rep, inner old old_rep, and inner new old_rep2 in handleIMSReply() are equal. No changes in Squid behavior are expected. --- diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 19763b7076..b76d782b71 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -356,14 +356,11 @@ clientReplyContext::handleIMSReply(StoreIOBuffer result) HttpReply *old_rep = (HttpReply *) old_entry->getReply(); // origin replied 304 - // TODO FIXME: old_rep2 was forcibly unshadowed, used to be old_rep. Are we sure - // that the right semantics were preserved? if (status == HTTP_NOT_MODIFIED) { http->logType = LOG_TCP_REFRESH_UNMODIFIED; // update headers on existing entry - HttpReply *old_rep2 = (HttpReply *) old_entry->getReply(); - old_rep2->updateOnNotModified(http->storeEntry()->getReply()); + old_rep->updateOnNotModified(http->storeEntry()->getReply()); old_entry->timestampsSet(); // if client sent IMS @@ -375,7 +372,7 @@ clientReplyContext::handleIMSReply(StoreIOBuffer result) } else { // send existing entry, it's still valid debugs(88, 3, "handleIMSReply: origin replied 304, revalidating existing entry and sending " << - old_rep2->sline.status << " to client"); + old_rep->sline.status << " to client"); sendClientOldEntry(); } }