From ca9f359b75875e1757c4352c82b824eff154882d Mon Sep 17 00:00:00 2001 From: samuelw Date: Mon, 15 Dec 2014 14:22:04 -0800 Subject: [PATCH] Fix bug with generating grpc c++ code for proto files containing multiple services. Hit this experimenting with using grpc to talk to pubsub. Change on 2014/12/15 by samuelw ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=82175646 --- src/compiler/cpp_generator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index d66811d7d28..27d4745e665 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -240,7 +240,7 @@ string GetHeaderServices(const google::protobuf::FileDescriptor* file) { map vars; for (int i = 0; i < file->service_count(); ++i) { - PrintHeaderService(&printer, file->service(0), &vars); + PrintHeaderService(&printer, file->service(i), &vars); printer.Print("\n"); } return output; @@ -442,7 +442,7 @@ string GetSourceServices(const google::protobuf::FileDescriptor* file) { map vars; for (int i = 0; i < file->service_count(); ++i) { - PrintSourceService(&printer, file->service(0), &vars); + PrintSourceService(&printer, file->service(i), &vars); printer.Print("\n"); } return output;