]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Cleanup: Remove old_rep2 from clientReplyContext::handleIMSReply().
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 27 Sep 2010 18:42:05 +0000 (12:42 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Mon, 27 Sep 2010 18:42:05 +0000 (12:42 -0600)
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.

src/client_side_reply.cc

index 19763b7076bb3fbd6264bac231f98455a98ed269..b76d782b713144cf63857f3cfdb9c39c751f864b 100644 (file)
@@ -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();
         }
     }