Take grpc_workaround_list as parameter

pull/11118/head
Muxi Yan 8 years ago
parent 7aa3a7fb6e
commit f6b622c08a
  1. 3
      include/grpc++/server_builder.h
  2. 3
      src/cpp/server/server_builder.cc

@ -46,6 +46,7 @@
#include <grpc/compression.h>
#include <grpc/support/cpu.h>
#include <grpc/support/useful.h>
#include <grpc/support/workaround_list.h>
struct grpc_resource_quota;
@ -187,7 +188,7 @@ class ServerBuilder {
/// Enable a server workaround. Do not use unless you know what the workaround
/// does. For explanation and detailed descriptions of workarounds, see
/// doc/workarounds.md.
ServerBuilder& EnableWorkaround(uint32_t id);
ServerBuilder& EnableWorkaround(grpc_workaround_list id);
private:
friend class ::grpc::testing::ServerBuilderPluginTest;

@ -39,7 +39,6 @@
#include <grpc/support/cpu.h>
#include <grpc/support/log.h>
#include <grpc/support/useful.h>
#include <grpc/support/workaround_list.h>
#include "src/cpp/server/thread_pool_interface.h"
@ -359,7 +358,7 @@ void ServerBuilder::InternalAddPluginFactory(
(*g_plugin_factory_list).push_back(CreatePlugin);
}
ServerBuilder& ServerBuilder::EnableWorkaround(uint32_t id) {
ServerBuilder& ServerBuilder::EnableWorkaround(grpc_workaround_list id) {
switch (id) {
case GRPC_WORKAROUND_ID_CRONET_COMPRESSION:
return AddChannelArgument(GRPC_ARG_WORKAROUND_CRONET_COMPRESSION, 1);

Loading…
Cancel
Save