aboutsummaryrefslogtreecommitdiff
path: root/src/zenutil/cache/cacherequests.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-03-21 10:58:28 +0100
committerGitHub Enterprise <[email protected]>2024-03-21 10:58:28 +0100
commit9b82209e3368de806a48554d85cb7c364973eb2d (patch)
tree8b52dbe1fd5a1a3255c51198a7b31bef77cf9009 /src/zenutil/cache/cacherequests.cpp
parentimproved process monitoring behaviour with invalid pids (#16) (diff)
downloadzen-9b82209e3368de806a48554d85cb7c364973eb2d.tar.xz
zen-9b82209e3368de806a48554d85cb7c364973eb2d.zip
add support for responding with partial cache chunks (#11)
* add support for responding with partial cache chunks
Diffstat (limited to 'src/zenutil/cache/cacherequests.cpp')
-rw-r--r--src/zenutil/cache/cacherequests.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/zenutil/cache/cacherequests.cpp b/src/zenutil/cache/cacherequests.cpp
index f4de6bacd..442cf0dfc 100644
--- a/src/zenutil/cache/cacherequests.cpp
+++ b/src/zenutil/cache/cacherequests.cpp
@@ -792,8 +792,9 @@ namespace cacherequests {
bool Succeeded = !RawHashField.HasError();
if (Succeeded)
{
+ ValueResult.RawOffset = RecordObject["RawOffset"].AsUInt64(0);
const CbAttachment* Attachment = Package.FindAttachment(ValueResult.RawHash);
- ValueResult.Body = Attachment ? Attachment->AsCompressedBinary() : CompressedBuffer();
+ ValueResult.Body = Attachment ? Attachment->AsCompressedBinary().MakeOwned() : CompressedBuffer();
if (ValueResult.Body)
{
ValueResult.RawSize = ValueResult.Body.DecodeRawSize();