diff options
author | Craig Tiller <ctiller@google.com> | 2015-09-18 07:44:19 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-09-18 07:44:19 -0700 |
commit | 33825118df7157219cec15382beb006d3462ad96 (patch) | |
tree | 649a40da98f56a875ed6558e474dd6c61ce2c7be /src/core/client_config/resolvers | |
parent | 000cd8f9f7346defc79fe6aa877af11b42ab5f1e (diff) |
Cleanup
Diffstat (limited to 'src/core/client_config/resolvers')
-rw-r--r-- | src/core/client_config/resolvers/dns_resolver.c | 18 | ||||
-rw-r--r-- | src/core/client_config/resolvers/sockaddr_resolver.c | 19 | ||||
-rw-r--r-- | src/core/client_config/resolvers/zookeeper_resolver.c | 21 |
3 files changed, 28 insertions, 30 deletions
diff --git a/src/core/client_config/resolvers/dns_resolver.c b/src/core/client_config/resolvers/dns_resolver.c index 4fee543a5b..e251664e03 100644 --- a/src/core/client_config/resolvers/dns_resolver.c +++ b/src/core/client_config/resolvers/dns_resolver.c @@ -69,7 +69,7 @@ typedef struct { /** which version of resolved_config is current? */ int resolved_version; /** pending next completion, or NULL */ - grpc_iomgr_closure *next_completion; + grpc_closure *next_completion; /** target config address for next completion */ grpc_client_config **target_config; /** current (fully resolved) config */ @@ -79,7 +79,7 @@ typedef struct { static void dns_destroy(grpc_resolver *r); static void dns_start_resolving_locked(dns_resolver *r); -static grpc_iomgr_closure *dns_maybe_finish_next_locked(dns_resolver *r) +static grpc_closure *dns_maybe_finish_next_locked(dns_resolver *r) GRPC_MUST_USE_RESULT; static void dns_shutdown(grpc_resolver *r); @@ -87,14 +87,14 @@ static void dns_channel_saw_error(grpc_resolver *r, struct sockaddr *failing_address, int failing_address_len); static void dns_next(grpc_resolver *r, grpc_client_config **target_config, - grpc_iomgr_closure *on_complete); + grpc_closure *on_complete); static const grpc_resolver_vtable dns_resolver_vtable = { dns_destroy, dns_shutdown, dns_channel_saw_error, dns_next}; static void dns_shutdown(grpc_resolver *resolver) { dns_resolver *r = (dns_resolver *)resolver; - grpc_iomgr_closure *next_completion; + grpc_closure *next_completion; gpr_mu_lock(&r->mu); next_completion = r->next_completion; r->next_completion = NULL; @@ -117,9 +117,9 @@ static void dns_channel_saw_error(grpc_resolver *resolver, struct sockaddr *sa, static void dns_next(grpc_resolver *resolver, grpc_client_config **target_config, - grpc_iomgr_closure *on_complete) { + grpc_closure *on_complete) { dns_resolver *r = (dns_resolver *)resolver; - grpc_iomgr_closure *call = NULL; + grpc_closure *call = NULL; gpr_mu_lock(&r->mu); GPR_ASSERT(!r->next_completion); r->next_completion = on_complete; @@ -141,7 +141,7 @@ static void dns_on_resolved(void *arg, grpc_resolved_addresses *addresses) { grpc_subchannel **subchannels; grpc_subchannel_args args; grpc_lb_policy *lb_policy; - grpc_iomgr_closure *call; + grpc_closure *call; size_t i; if (addresses) { grpc_lb_policy_args lb_policy_args; @@ -188,8 +188,8 @@ static void dns_start_resolving_locked(dns_resolver *r) { grpc_resolve_address(r->name, r->default_port, dns_on_resolved, r); } -static grpc_iomgr_closure *dns_maybe_finish_next_locked(dns_resolver *r) { - grpc_iomgr_closure *ret = NULL; +static grpc_closure *dns_maybe_finish_next_locked(dns_resolver *r) { + grpc_closure *ret = NULL; if (r->next_completion != NULL && r->resolved_version != r->published_version) { *r->target_config = r->resolved_config; diff --git a/src/core/client_config/resolvers/sockaddr_resolver.c b/src/core/client_config/resolvers/sockaddr_resolver.c index 220915853c..47fe5fad4a 100644 --- a/src/core/client_config/resolvers/sockaddr_resolver.c +++ b/src/core/client_config/resolvers/sockaddr_resolver.c @@ -73,22 +73,22 @@ typedef struct { /** have we published? */ int published; /** pending next completion, or NULL */ - grpc_iomgr_closure *next_completion; + grpc_closure *next_completion; /** target config address for next completion */ grpc_client_config **target_config; } sockaddr_resolver; static void sockaddr_destroy(grpc_resolver *r); -static grpc_iomgr_closure *sockaddr_maybe_finish_next_locked( - sockaddr_resolver *r) GRPC_MUST_USE_RESULT; +static grpc_closure *sockaddr_maybe_finish_next_locked(sockaddr_resolver *r) + GRPC_MUST_USE_RESULT; static void sockaddr_shutdown(grpc_resolver *r); static void sockaddr_channel_saw_error(grpc_resolver *r, struct sockaddr *failing_address, int failing_address_len); static void sockaddr_next(grpc_resolver *r, grpc_client_config **target_config, - grpc_iomgr_closure *on_complete); + grpc_closure *on_complete); static const grpc_resolver_vtable sockaddr_resolver_vtable = { sockaddr_destroy, sockaddr_shutdown, sockaddr_channel_saw_error, @@ -96,7 +96,7 @@ static const grpc_resolver_vtable sockaddr_resolver_vtable = { static void sockaddr_shutdown(grpc_resolver *resolver) { sockaddr_resolver *r = (sockaddr_resolver *)resolver; - grpc_iomgr_closure *call = NULL; + grpc_closure *call = NULL; gpr_mu_lock(&r->mu); if (r->next_completion != NULL) { *r->target_config = NULL; @@ -114,9 +114,9 @@ static void sockaddr_channel_saw_error(grpc_resolver *resolver, static void sockaddr_next(grpc_resolver *resolver, grpc_client_config **target_config, - grpc_iomgr_closure *on_complete) { + grpc_closure *on_complete) { sockaddr_resolver *r = (sockaddr_resolver *)resolver; - grpc_iomgr_closure *call = NULL; + grpc_closure *call = NULL; gpr_mu_lock(&r->mu); GPR_ASSERT(!r->next_completion); r->next_completion = on_complete; @@ -126,14 +126,13 @@ static void sockaddr_next(grpc_resolver *resolver, if (call) call->cb(call->cb_arg, 1); } -static grpc_iomgr_closure *sockaddr_maybe_finish_next_locked( - sockaddr_resolver *r) { +static grpc_closure *sockaddr_maybe_finish_next_locked(sockaddr_resolver *r) { grpc_client_config *cfg; grpc_lb_policy *lb_policy; grpc_lb_policy_args lb_policy_args; grpc_subchannel **subchannels; grpc_subchannel_args args; - grpc_iomgr_closure *call = NULL; + grpc_closure *call = NULL; if (r->next_completion != NULL && !r->published) { size_t i; diff --git a/src/core/client_config/resolvers/zookeeper_resolver.c b/src/core/client_config/resolvers/zookeeper_resolver.c index 94ec12dd16..5632f0425e 100644 --- a/src/core/client_config/resolvers/zookeeper_resolver.c +++ b/src/core/client_config/resolvers/zookeeper_resolver.c @@ -73,7 +73,7 @@ typedef struct { /** which version of resolved_config is current? */ int resolved_version; /** pending next completion, or NULL */ - grpc_iomgr_closure *next_completion; + grpc_closure *next_completion; /** target config address for next completion */ grpc_client_config **target_config; /** current (fully resolved) config */ @@ -92,15 +92,15 @@ typedef struct { static void zookeeper_destroy(grpc_resolver *r); static void zookeeper_start_resolving_locked(zookeeper_resolver *r); -static grpc_iomgr_closure *zookeeper_maybe_finish_next_locked( - zookeeper_resolver *r) GRPC_MUST_USE_RESULT; +static grpc_closure *zookeeper_maybe_finish_next_locked(zookeeper_resolver *r) + GRPC_MUST_USE_RESULT; static void zookeeper_shutdown(grpc_resolver *r); static void zookeeper_channel_saw_error(grpc_resolver *r, struct sockaddr *failing_address, int failing_address_len); static void zookeeper_next(grpc_resolver *r, grpc_client_config **target_config, - grpc_iomgr_closure *on_complete); + grpc_closure *on_complete); static const grpc_resolver_vtable zookeeper_resolver_vtable = { zookeeper_destroy, zookeeper_shutdown, zookeeper_channel_saw_error, @@ -108,7 +108,7 @@ static const grpc_resolver_vtable zookeeper_resolver_vtable = { static void zookeeper_shutdown(grpc_resolver *resolver) { zookeeper_resolver *r = (zookeeper_resolver *)resolver; - grpc_iomgr_closure *call = NULL; + grpc_closure *call = NULL; gpr_mu_lock(&r->mu); if (r->next_completion != NULL) { *r->target_config = NULL; @@ -134,9 +134,9 @@ static void zookeeper_channel_saw_error(grpc_resolver *resolver, static void zookeeper_next(grpc_resolver *resolver, grpc_client_config **target_config, - grpc_iomgr_closure *on_complete) { + grpc_closure *on_complete) { zookeeper_resolver *r = (zookeeper_resolver *)resolver; - grpc_iomgr_closure *call; + grpc_closure *call; gpr_mu_lock(&r->mu); GPR_ASSERT(r->next_completion == NULL); r->next_completion = on_complete; @@ -189,7 +189,7 @@ static void zookeeper_on_resolved(void *arg, grpc_subchannel **subchannels; grpc_subchannel_args args; grpc_lb_policy *lb_policy; - grpc_iomgr_closure *call; + grpc_closure *call; size_t i; if (addresses != NULL) { grpc_lb_policy_args lb_policy_args; @@ -414,9 +414,8 @@ static void zookeeper_start_resolving_locked(zookeeper_resolver *r) { zookeeper_resolve_address(r); } -static grpc_iomgr_closure *zookeeper_maybe_finish_next_locked( - zookeeper_resolver *r) { - grpc_iomgr_closure *call = NULL; +static grpc_closure *zookeeper_maybe_finish_next_locked(zookeeper_resolver *r) { + grpc_closure *call = NULL; if (r->next_completion != NULL && r->resolved_version != r->published_version) { *r->target_config = r->resolved_config; |