Skip to content
Snippets Groups Projects
Commit e1418e4a authored by Vijay Pai's avatar Vijay Pai
Browse files

Switch to idiomatic Slice API

parent a27680b5
No related branches found
No related tags found
No related merge requests found
......@@ -550,8 +550,7 @@ static Status ProcessGenericRPC(const PayloadConfig &payload_config,
ByteBuffer *response) {
int resp_size = payload_config.bytebuf_params().resp_size();
std::unique_ptr<char[]> buf(new char[resp_size]);
grpc_slice s = grpc_slice_from_copied_buffer(buf.get(), resp_size);
Slice slice(s, Slice::STEAL_REF);
Slice slice(buf.get(), resp_size);
*response = ByteBuffer(&slice, 1);
return Status::OK;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment