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 BIDI_STREAMING
}; };
RpcMethod(const char* name, RpcType type)
: name_(name), method_type_(type), channel_tag_(NULL) {}
RpcMethod(const char* name, RpcType type, RpcMethod(const char* name, RpcType type,
const std::shared_ptr<Channel>& channel) const std::shared_ptr<Channel>& channel)
: name_(name), : name_(name),

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

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

Loading…
Cancel
Save