diff options
author | Yuxuan Li <yuxuanli@google.com> | 2017-03-20 12:35:38 -0700 |
---|---|---|
committer | Yuxuan Li <yuxuanli@google.com> | 2017-03-20 12:35:38 -0700 |
commit | 8d00f52d5b090585f4c66af0d17d359e5893ee5b (patch) | |
tree | 111c7c3e34a50d1b76646ec95a5349b8b8cd228d /include/grpc++ | |
parent | 0574b58869a64db5f23b52c8151cfc22b1539c2f (diff) |
fix EnsureInitialMetadataSent type casting
Diffstat (limited to 'include/grpc++')
-rw-r--r-- | include/grpc++/impl/codegen/async_stream.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/include/grpc++/impl/codegen/async_stream.h b/include/grpc++/impl/codegen/async_stream.h index f5fbb53c81..c67e5e2247 100644 --- a/include/grpc++/impl/codegen/async_stream.h +++ b/include/grpc++/impl/codegen/async_stream.h @@ -451,7 +451,9 @@ class ServerAsyncReader final : public ServerAsyncReaderInterface<W, R> { ServerContext* ctx_; CallOpSet<CallOpSendInitialMetadata> meta_ops_; CallOpSet<CallOpRecvMessage<R>> read_ops_; - CallOpSet<CallOpSendInitialMetadata, CallOpServerSendStatus> finish_ops_; + CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, + CallOpServerSendStatus> + finish_ops_; }; template <class W> @@ -494,12 +496,14 @@ class ServerAsyncWriter final : public ServerAsyncWriterInterface<W> { call_.PerformOps(&meta_ops_); } - void EnsureInitialMetadataSent(CallOpSetInterface* ops) { + void EnsureInitialMetadataSent(CallOpSetInterface* ops_in) { + CallOpSet<CallOpSendInitialMetadata>* ops = + static_cast<CallOpSet<CallOpSendInitialMetadata>*>(ops_in); if (!ctx_->sent_initial_metadata_) { - ops.SendInitialMetadata(ctx_->initial_metadata_, - ctx_->initial_metadata_flags()); + ops->SendInitialMetadata(ctx_->initial_metadata_, + ctx_->initial_metadata_flags()); if (ctx_->compression_level_set()) { - ops.set_compression_level(ctx_->compression_level()); + ops->set_compression_level(ctx_->compression_level()); } ctx_->sent_initial_metadata_ = true; } @@ -597,12 +601,14 @@ class ServerAsyncReaderWriter final call_.PerformOps(&meta_ops_); } - void EnsureInitialMetadataSent(CallOpSetInterface* ops) { + void EnsureInitialMetadataSent(CallOpSetInterface* ops_in) { + CallOpSet<CallOpSendInitialMetadata>* ops = + static_cast<CallOpSet<CallOpSendInitialMetadata>*>(ops_in); if (!ctx_->sent_initial_metadata_) { - ops.SendInitialMetadata(ctx_->initial_metadata_, - ctx_->initial_metadata_flags()); + ops->SendInitialMetadata(ctx_->initial_metadata_, + ctx_->initial_metadata_flags()); if (ctx_->compression_level_set()) { - ops.set_compression_level(ctx_->compression_level()); + ops->set_compression_level(ctx_->compression_level()); } ctx_->sent_initial_metadata_ = true; } |