Commit c00718bf authored by wangxuefeng's avatar wangxuefeng

Fix register thrift protocol issue

parent eea2303d
......@@ -73,7 +73,7 @@ int main(int argc, char* argv[]) {
req.raw().data = "hello";
cntl.set_thrift_method_name("Echo");
//cntl.set_thrift_method_name("Echo");
channel.CallMethod(NULL, &cntl, &req, &res, NULL);
......
......@@ -632,6 +632,8 @@ void PackThriftRequest(
} // namespace policy
extern "C" {
void RegisterThriftProtocol() {
Protocol thrift_binary_protocol = {policy::ParseThriftMessage,
......@@ -639,11 +641,11 @@ void RegisterThriftProtocol() {
policy::ProcessThriftRequest, policy::ProcessThriftResponse,
policy::VerifyThriftRequest, NULL, NULL,
CONNECTION_TYPE_POOLED_AND_SHORT, "thrift" };
if (RegisterProtocol(PROTOCOL_THRIFT, thrift_binary_protocol) != 0) {
if (brpc::RegisterProtocol(PROTOCOL_THRIFT, thrift_binary_protocol) != 0) {
exit(1);
}
}
}
} // namespace brpc
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment