Merge pull request #5267 from bogdandrutu/bug

Fix the arguments type for on_read and destroy callbacks in iomgr
pull/5273/head
Craig Tiller 9 years ago
commit a5b94057d1
  1. 9
      src/core/iomgr/udp_server.c
  2. 2
      test/core/iomgr/udp_server_test.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);

@ -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);
}

Loading…
Cancel
Save