diff options
author | Yang Gao <yangg@google.com> | 2015-02-12 22:18:56 -0800 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-02-12 22:18:56 -0800 |
commit | cbc427a9557460375ad686081c775339fcfa2a38 (patch) | |
tree | dc514a452ca0e2eddb778db2f76b0068dd20c3a9 /src/cpp/common | |
parent | 0220cf14b02e9d3aa43c9cece4f52a8ca3f49d55 (diff) |
allow null got_message
Diffstat (limited to 'src/cpp/common')
-rw-r--r-- | src/cpp/common/call.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cpp/common/call.cc b/src/cpp/common/call.cc index d706ec45e5..3f9b4852b9 100644 --- a/src/cpp/common/call.cc +++ b/src/cpp/common/call.cc @@ -256,12 +256,16 @@ void CallOpBuffer::FinalizeResult(void **tag, bool *status) { // Parse received message if any. if (recv_message_) { if (recv_message_buf_) { - *got_message_ = true; + if (got_message_) { + *got_message_ = true; + } *status = DeserializeProto(recv_message_buf_, recv_message_); grpc_byte_buffer_destroy(recv_message_buf_); recv_message_buf_ = nullptr; } else { - *got_message_ = false; + if (got_message_) { + *got_message_ = false; + } } } // Parse received status. |