Skip to content

Commit

Permalink
Fix the arguments type for on_read and destroy callbacks to match wit…
Browse files Browse the repository at this point in the history
…h grpc_iomgr_cb_func
  • Loading branch information
Bogdan Drutu committed Feb 16, 2016
1 parent 221bb1d commit f89fdf3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/core/iomgr/udp_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down Expand Up @@ -263,10 +264,10 @@ static int prepare_socket(int fd, const struct sockaddr *addr,
}

/* 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);
Expand Down
2 changes: 1 addition & 1 deletion test/core/iomgr/udp_server_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit f89fdf3

Please sign in to comment.