diff options
author | Robbie Shade <robbie.shade@gmail.com> | 2017-02-07 19:49:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-07 19:49:57 -0500 |
commit | d92d8270e8cc8e02a8119df69ed3b2523bd22de7 (patch) | |
tree | 0df99ae592fafdc919a61fb3001f0969c401346f /src/core/lib | |
parent | 86e3a5490062fc0c004ad1f2c0a72a38b13c83b1 (diff) | |
parent | 49124e7ae16bd7423a1fa238181743a797d72437 (diff) |
Merge pull request #9617 from rjshade/add_exec_ctx_to_orphan_callback
Adds an exec_ctx argument to orphan_cb in udp_server
Diffstat (limited to 'src/core/lib')
-rw-r--r-- | src/core/lib/iomgr/udp_server.c | 4 | ||||
-rw-r--r-- | src/core/lib/iomgr/udp_server.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index 02a194c982..2a1c8d39fa 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -178,7 +178,7 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { /* Call the orphan_cb to signal that the FD is about to be closed and * should no longer be used. */ GPR_ASSERT(sp->orphan_cb); - sp->orphan_cb(sp->emfd); + sp->orphan_cb(exec_ctx, sp->emfd); grpc_fd_orphan(exec_ctx, sp->emfd, &sp->destroyed_closure, NULL, "udp_listener_shutdown"); @@ -204,7 +204,7 @@ void grpc_udp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_udp_server *s, if (s->active_ports) { for (sp = s->head; sp; sp = sp->next) { GPR_ASSERT(sp->orphan_cb); - sp->orphan_cb(sp->emfd); + sp->orphan_cb(exec_ctx, sp->emfd); grpc_fd_shutdown(exec_ctx, sp->emfd, GRPC_ERROR_CREATE("Server destroyed")); } diff --git a/src/core/lib/iomgr/udp_server.h b/src/core/lib/iomgr/udp_server.h index ce068cbf04..ed63fa7d81 100644 --- a/src/core/lib/iomgr/udp_server.h +++ b/src/core/lib/iomgr/udp_server.h @@ -54,7 +54,8 @@ typedef void (*grpc_udp_server_write_cb)(grpc_exec_ctx *exec_ctx, grpc_fd *emfd); /* Called when the grpc_fd is about to be orphaned (and the FD closed). */ -typedef void (*grpc_udp_server_orphan_cb)(grpc_fd *emfd); +typedef void (*grpc_udp_server_orphan_cb)(grpc_exec_ctx *exec_ctx, + grpc_fd *emfd); /* Create a server, initially not bound to any ports */ grpc_udp_server *grpc_udp_server_create(void); |