]> 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)
committerFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Wed, 11 Oct 2023 13:51:41 +0000 (15:51 +0200)
commit29805b0a80f46a52b4e31e574f92ad4466f077f3
tree6dd199da5fb33a0352a12b3e230b2be20f587834
parentcbd7fb6a0fb9877e6aaada27d1e258d93eb622a3
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