diff options
author | David Garcia Quintas <dgq@google.com> | 2015-09-12 00:58:24 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2015-09-12 00:58:24 -0700 |
commit | bc203a88d7903fa88f8323a6607d155f1aef8e0c (patch) | |
tree | 836907625bfc5933e45180f28cb73950295a4270 /src/core | |
parent | 7496d01ab8f88acf65be047e3b79954bd4e6cfbe (diff) |
Updated zookeper resolver to new LB API
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/client_config/resolvers/zookeeper_resolver.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/client_config/resolvers/zookeeper_resolver.c b/src/core/client_config/resolvers/zookeeper_resolver.c index e425913cd0..2594e6fae9 100644 --- a/src/core/client_config/resolvers/zookeeper_resolver.c +++ b/src/core/client_config/resolvers/zookeeper_resolver.c @@ -182,6 +182,7 @@ static void zookeeper_on_resolved(void *arg, grpc_lb_policy *lb_policy; size_t i; if (addresses != NULL) { + grpc_lb_policy_args lb_policy_args; config = grpc_client_config_create(); subchannels = gpr_malloc(sizeof(grpc_subchannel *) * addresses->naddrs); for (i = 0; i < addresses->naddrs; i++) { @@ -191,8 +192,10 @@ static void zookeeper_on_resolved(void *arg, subchannels[i] = grpc_subchannel_factory_create_subchannel( r->subchannel_factory, &args); } + lb_policy_args.subchannels = subchannels; + lb_policy_args.num_subchannels = addresses->naddrs; lb_policy = - grpc_lb_policy_create(r->lb_policy_name, subchannels, addresses->naddrs); + grpc_lb_policy_create(r->lb_policy_name, &lb_policy_args); grpc_client_config_set_lb_policy(config, lb_policy); GRPC_LB_POLICY_UNREF(lb_policy, "construction"); grpc_resolved_addresses_destroy(addresses); |