Switch to idiomatic Slice API

pull/12140/head
Vijay Pai 7 years ago
parent a27680b597
commit e1418e4ab1
  1. 3
      test/cpp/qps/server_async.cc

@ -550,8 +550,7 @@ static Status ProcessGenericRPC(const PayloadConfig &payload_config,
ByteBuffer *response) { ByteBuffer *response) {
int resp_size = payload_config.bytebuf_params().resp_size(); int resp_size = payload_config.bytebuf_params().resp_size();
std::unique_ptr<char[]> buf(new char[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(buf.get(), resp_size);
Slice slice(s, Slice::STEAL_REF);
*response = ByteBuffer(&slice, 1); *response = ByteBuffer(&slice, 1);
return Status::OK; return Status::OK;
} }

Loading…
Cancel
Save