diff options
author | Craig Tiller <ctiller@google.com> | 2016-02-16 15:51:43 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-02-16 15:51:43 -0800 |
commit | a5b94057d190190efb5e5146c23442d74e713980 (patch) | |
tree | 4c14063ac9268bff7a1e2c6c8f27cee8249975d3 /src | |
parent | 521c12d8a1d5492955667159c20dd6a6ee3630c5 (diff) | |
parent | ddecc6198ea1849ec93c566b33940b37ae23a2ef (diff) |
Merge pull request #5267 from bogdandrutu/bug
Fix the arguments type for on_read and destroy callbacks in iomgr
Diffstat (limited to 'src')
-rw-r--r-- | src/core/iomgr/udp_server.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/iomgr/udp_server.c b/src/core/iomgr/udp_server.c index fe006c603c..ef548cfe4d 100644 --- a/src/core/iomgr/udp_server.c +++ b/src/core/iomgr/udp_server.c @@ -137,7 +137,7 @@ grpc_udp_server *grpc_udp_server_create(void) { } static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { - grpc_exec_ctx_enqueue(exec_ctx, s->shutdown_complete, 1); + grpc_exec_ctx_enqueue(exec_ctx, s->shutdown_complete, 1, NULL); gpr_mu_destroy(&s->mu); gpr_cv_destroy(&s->cv); @@ -146,7 +146,8 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { gpr_free(s); } -static void destroyed_port(grpc_exec_ctx *exec_ctx, void *server, int success) { +static void destroyed_port(grpc_exec_ctx *exec_ctx, void *server, + bool success) { grpc_udp_server *s = server; gpr_mu_lock(&s->mu); s->destroyed_ports++; @@ -263,10 +264,10 @@ error: } /* event manager callback when reads are ready */ -static void on_read(grpc_exec_ctx *exec_ctx, void *arg, int success) { +static void on_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { server_port *sp = arg; - if (success == 0) { + if (!success) { gpr_mu_lock(&sp->server->mu); if (0 == --sp->server->active_ports) { gpr_mu_unlock(&sp->server->mu); |