aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Bogdan Drutu <bdrutu@google.com>2016-02-16 14:38:38 -0800
committerGravatar Bogdan Drutu <bdrutu@google.com>2016-02-16 14:38:38 -0800
commitf89fdf39df771e241e40ce019a678acc3afbb027 (patch)
treeaf41bdd6573877d6b9150d3cced714dcbe6ea6e3
parent221bb1dae0feb7801dacd4f2c32045a2e15651d9 (diff)
Fix the arguments type for on_read and destroy callbacks to match with grpc_iomgr_cb_func
-rw-r--r--src/core/iomgr/udp_server.c7
-rw-r--r--test/core/iomgr/udp_server_test.c2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/core/iomgr/udp_server.c b/src/core/iomgr/udp_server.c
index fe006c603c..955cac5482 100644
--- a/src/core/iomgr/udp_server.c
+++ b/src/core/iomgr/udp_server.c
@@ -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);
diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c
index 85e28732e4..0bb69a2a76 100644
--- a/test/core/iomgr/udp_server_test.c
+++ b/test/core/iomgr/udp_server_test.c
@@ -173,7 +173,7 @@ static void test_receive(int number_of_clients) {
grpc_exec_ctx_finish(&exec_ctx);
}
-static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, int success) {
+static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) {
grpc_pollset_destroy(p);
}