Fix server side and generic stub

pull/3008/head
yang-g 9 years ago
parent 431f8c2b5f
commit c2bd8a6d1a
  1. 3
      include/grpc++/impl/rpc_method.h
  2. 2
      include/grpc++/impl/rpc_service_method.h
  3. 3
      src/cpp/client/generic_stub.cc

@ -49,6 +49,9 @@ class RpcMethod {
BIDI_STREAMING
};
RpcMethod(const char* name, RpcType type)
: name_(name), method_type_(type), channel_tag_(NULL) {}
RpcMethod(const char* name, RpcType type,
const std::shared_ptr<Channel>& channel)
: name_(name),

@ -229,7 +229,7 @@ class RpcServiceMethod : public RpcMethod {
// Takes ownership of the handler
RpcServiceMethod(const char* name, RpcMethod::RpcType type,
MethodHandler* handler)
: RpcMethod(name, type, nullptr), handler_(handler) {}
: RpcMethod(name, type), handler_(handler) {}
MethodHandler* handler() { return handler_.get(); }

@ -44,8 +44,7 @@ std::unique_ptr<GenericClientAsyncReaderWriter> GenericStub::Call(
return std::unique_ptr<GenericClientAsyncReaderWriter>(
new GenericClientAsyncReaderWriter(
channel_.get(), cq,
RpcMethod(method.c_str(), RpcMethod::BIDI_STREAMING, nullptr),
context, tag));
RpcMethod(method.c_str(), RpcMethod::BIDI_STREAMING), context, tag));
}
} // namespace grpc

Loading…
Cancel
Save