From: Amos Jeffries Date: Wed, 20 Oct 2010 06:09:27 +0000 (-0600) Subject: Author: Alex Rousskov X-Git-Tag: SQUID_3_1_9~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=807e498e2028cecbf9aa9c74bff76893d674ae8d;p=thirdparty%2Fsquid.git Author: Alex Rousskov 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 359dd028eb..522e6faebe 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -357,14 +357,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 @@ -376,7 +373,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(); } }