]> git.ipfire.org Git - thirdparty/squid.git/commit
Replaced clientReplyContext::tempBuffer with old_reqofs (#1304)
authorAlex Rousskov <rousskov@measurement-factory.com>
Sat, 11 Mar 2023 05:48:14 +0000 (05:48 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 12 Mar 2023 17:02:32 +0000 (17:02 +0000)
commit5921355e474ffbff2cb577c3622ce0e686e8996a
treeb9f500242df4387aacda08555aeb797b1e05ce23
parentbea89fe5a3f9491c1cb730c2969abd3e93904215
Replaced clientReplyContext::tempBuffer with old_reqofs (#1304)

The tempBuffer data member was not actually used as a buffer. We only
used its offset field, and only for saving reqofs (which has a different
type than tempBuffer.offset!). Replaced the buffer with old_reqofs,
consistent with the rest of the "saved stale entry state" code.

Also fixed old_reqsize type to match reqsize and grouped that member
with the other private "saved stale entry state" fields.

Bad old types probably did not trigger runtime failures because the
associated saved numbers are saved at the very beginning of fetching the
entry, when all these accumulation-related counters are still small.

The remaining reqofs and reqsize types are wrong for platforms where
size_t is not uint64_t, but fixing that deserves a dedicated change. For
now, we just made the types of "old_" and "current" members consistent.
src/client_side_reply.cc
src/client_side_reply.h