aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2016-05-06 13:21:36 -0700
committerGravatar Yuchen Zeng <zyc@google.com>2016-05-06 13:21:36 -0700
commit7d099a5c907d9ab164416ea875ae07a3074adedb (patch)
tree6fee66eb6ce9a86c937027458cc8593700d549da /src
parent3b8f3354de5af07ea595713623bcc19cd19d6dfe (diff)
Fix naming and comment problems
Diffstat (limited to 'src')
-rw-r--r--src/cpp/server/server_builder.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc
index b6e48efa8d..9658a56745 100644
--- a/src/cpp/server/server_builder.cc
+++ b/src/cpp/server/server_builder.cc
@@ -41,18 +41,20 @@
namespace grpc {
-static std::vector<std::unique_ptr<ServerBuilderPlugin> (*)()>* plugin_list;
+static std::vector<std::unique_ptr<ServerBuilderPlugin> (*)()>*
+ g_plugin_factory_list;
static gpr_once once_init_plugin_list = GPR_ONCE_INIT;
static void do_plugin_list_init(void) {
- plugin_list = new std::vector<std::unique_ptr<ServerBuilderPlugin> (*)()>();
+ g_plugin_factory_list =
+ new std::vector<std::unique_ptr<ServerBuilderPlugin> (*)()>();
}
ServerBuilder::ServerBuilder()
: max_message_size_(-1), generic_service_(nullptr) {
grpc_compression_options_init(&compression_options_);
gpr_once_init(&once_init_plugin_list, do_plugin_list_init);
- for (auto factory : (*plugin_list)) {
+ for (auto factory : (*g_plugin_factory_list)) {
std::unique_ptr<ServerBuilderPlugin> plugin = factory();
plugins_[plugin->name()] = std::move(plugin);
}
@@ -171,7 +173,7 @@ std::unique_ptr<Server> ServerBuilder::BuildAndStart() {
void ServerBuilder::InternalAddPluginFactory(
std::unique_ptr<ServerBuilderPlugin> (*CreatePlugin)()) {
gpr_once_init(&once_init_plugin_list, do_plugin_list_init);
- (*plugin_list).push_back(CreatePlugin);
+ (*g_plugin_factory_list).push_back(CreatePlugin);
}
} // namespace grpc