diff options
author | samuelw <samuelw@google.com> | 2014-12-15 14:22:04 -0800 |
---|---|---|
committer | Michael Lumish <mlumish@google.com> | 2014-12-15 14:55:58 -0800 |
commit | ca9f359b75875e1757c4352c82b824eff154882d (patch) | |
tree | 85491098dfad72b3f4331ab73f23ee23b5d70671 | |
parent | 31a829c165027b9a001f21ff161af4a44869e5f6 (diff) |
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 <samuelw@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82175646
-rw-r--r-- | src/compiler/cpp_generator.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index d66811d7d2..27d4745e66 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<string, string> 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<string, string> 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; |