From 8c1a723ba55d1574590eba801d64afab9c49e017 Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Mon, 9 Jan 2017 15:54:31 -0800 Subject: [PATCH] Fixed GRPC method name generation. Change-Id: I827b7e9aee1edb77752322455f7b6fafac16fb1d Tested: on Linux. --- src/idl_parser.cpp | 3 +-- tests/monster_test.grpc.fb.cc | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp index 81e7fe2e2..e772f343a 100644 --- a/src/idl_parser.cpp +++ b/src/idl_parser.cpp @@ -149,8 +149,7 @@ std::string Namespace::GetFullyQualifiedName(const std::string &name, } stream << components[i]; } - - stream << "." << name; + if (name.length()) stream << "." << name; return stream.str(); } diff --git a/tests/monster_test.grpc.fb.cc b/tests/monster_test.grpc.fb.cc index e3127f5d6..c8ed1f543 100644 --- a/tests/monster_test.grpc.fb.cc +++ b/tests/monster_test.grpc.fb.cc @@ -18,8 +18,8 @@ namespace MyGame { namespace Example { static const char* MonsterStorage_method_names[] = { - "/MyGame.Example..MonsterStorage/Store", - "/MyGame.Example..MonsterStorage/Retrieve", + "/MyGame.Example.MonsterStorage/Store", + "/MyGame.Example.MonsterStorage/Retrieve", }; std::unique_ptr< MonsterStorage::Stub> MonsterStorage::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {