Created
July 23, 2019 14:46
-
-
Save shawncao/7f3d6bb26feb2e0f48888a5ea4ab0f53 to your computer and use it in GitHub Desktop.
Revisions
-
shawncao created this gist
Jul 23, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ // Deserialize by pulling the - static grpc::Status Deserialize(grpc_byte_buffer *buffer, + static grpc::Status Deserialize(ByteBuffer *bb, flatbuffers::grpc::Message<T> *msg) { - if (!buffer) { + grpc_byte_buffer* buffer = nullptr; + if (!bb || !(buffer = bb->c_buffer())) { return ::grpc::Status(::grpc::StatusCode::INTERNAL, "No payload"); } // Check if this is a single uncompressed slice.