summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-05-02 12:09:59 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-05-03 15:53:15 +0200
commiteea0c0d7932edef46c28c67876930611284c0338 (patch)
treeafd6ade410ea68e2fed6ca5db9f41af317754b8a /src
parentfb0dad18c3b33cbfcc936eb4dbeac8cde9688c80 (diff)
downloadjustbuild-eea0c0d7932edef46c28c67876930611284c0338.tar.gz
grpc: fix build fail with protobuf in debug mode
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/execution_api/remote/bazel/bytestream_client.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp b/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp
index b9a55707..5f627faf 100644
--- a/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp
+++ b/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp
@@ -109,11 +109,12 @@ class ByteStreamClient {
google::bytestream::WriteRequest request{};
request.set_resource_name(resource_name);
request.set_allocated_data(allocated_data);
+
std::size_t pos{};
do {
auto const size = std::min(data.size() - pos, kChunkSize);
- allocated_data->resize(size);
- data.copy(allocated_data->data(), size, pos);
+ request.mutable_data()->resize(size);
+ data.copy(request.mutable_data()->data(), size, pos);
request.set_write_offset(static_cast<int>(pos));
request.set_finish_write(pos + size >= data.size());
if (not writer->Write(request)) {