diff options
author | 2015-02-04 11:43:50 -0800 | |
---|---|---|
committer | 2015-02-04 11:43:50 -0800 | |
commit | 280744ec642241c840521b92452f7965c3f94274 (patch) | |
tree | 17ee0872b7af056964238609a354b2828d61e7a6 /src/cpp/server/async_server_context.cc | |
parent | 2d03e042e71e76734685215de8d5c6c32e94b3d0 (diff) | |
parent | bf5b26103d10016b0731051f38a6d8c9cd9e10c0 (diff) |
Merge remote-tracking branch 'upstream/master'
Resolve a conflict between adding write buffer hint
and the change of API
Conflicts:
src/cpp/server/async_server_context.cc
Diffstat (limited to 'src/cpp/server/async_server_context.cc')
-rw-r--r-- | src/cpp/server/async_server_context.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cpp/server/async_server_context.cc b/src/cpp/server/async_server_context.cc index 8e03f7257c..886e794137 100644 --- a/src/cpp/server/async_server_context.cc +++ b/src/cpp/server/async_server_context.cc @@ -53,14 +53,15 @@ AsyncServerContext::AsyncServerContext( AsyncServerContext::~AsyncServerContext() { grpc_call_destroy(call_); } void AsyncServerContext::Accept(grpc_completion_queue *cq) { - GPR_ASSERT(grpc_call_server_accept(call_, cq, this) == GRPC_CALL_OK); - GPR_ASSERT(grpc_call_server_end_initial_metadata(call_, GRPC_WRITE_BUFFER_HINT) == GRPC_CALL_OK); + GPR_ASSERT(grpc_call_server_accept_old(call_, cq, this) == GRPC_CALL_OK); + GPR_ASSERT(grpc_call_server_end_initial_metadata_old(call_, GRPC_WRITE_BUFFER_HINT) == + GRPC_CALL_OK); } bool AsyncServerContext::StartRead(google::protobuf::Message *request) { GPR_ASSERT(request); request_ = request; - grpc_call_error err = grpc_call_start_read(call_, this); + grpc_call_error err = grpc_call_start_read_old(call_, this); return err == GRPC_CALL_OK; } @@ -70,13 +71,13 @@ bool AsyncServerContext::StartWrite(const google::protobuf::Message &response, if (!SerializeProto(response, &buffer)) { return false; } - grpc_call_error err = grpc_call_start_write(call_, buffer, this, flags); + grpc_call_error err = grpc_call_start_write_old(call_, buffer, this, flags); grpc_byte_buffer_destroy(buffer); return err == GRPC_CALL_OK; } bool AsyncServerContext::StartWriteStatus(const Status &status) { - grpc_call_error err = grpc_call_start_write_status( + grpc_call_error err = grpc_call_start_write_status_old( call_, static_cast<grpc_status_code>(status.code()), status.details().empty() ? nullptr : const_cast<char *>(status.details().c_str()), |