From 0c47d80769b0e1e8c7262911262dc92133bd24d5 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 28 May 2015 00:33:57 -0700 Subject: fixed compilation errors on windows code. --- src/core/iomgr/socket_windows.c | 9 ++++----- src/core/iomgr/socket_windows.h | 4 +++- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/core/iomgr/socket_windows.c b/src/core/iomgr/socket_windows.c index f0bd0d8d69..805fa8a4fc 100644 --- a/src/core/iomgr/socket_windows.c +++ b/src/core/iomgr/socket_windows.c @@ -39,7 +39,6 @@ #include #include "src/core/iomgr/iocp_windows.h" -#include "src/core/iomgr/iomgr.h" #include "src/core/iomgr/iomgr_internal.h" #include "src/core/iomgr/pollset.h" #include "src/core/iomgr/pollset_windows.h" @@ -64,15 +63,15 @@ int grpc_winsocket_shutdown(grpc_winsocket *socket) { gpr_mu_lock(&socket->state_mu); if (socket->read_info.cb) { callbacks_set++; - grpc_iomgr_closure_init(&socket->shutdown_iocb, socket->read_info.cb, + grpc_iomgr_closure_init(&socket->shutdown_closure, socket->read_info.cb, socket->read_info.opaque); - grpc_iomgr_add_delayed_callback(socket->shutdown_iocb, 0); + grpc_iomgr_add_delayed_callback(&socket->shutdown_closure, 0); } if (socket->write_info.cb) { callbacks_set++; - grpc_iomgr_closure_init(&socket->shutdown_iocb, socket->write_info.cb, + grpc_iomgr_closure_init(&socket->shutdown_closure, socket->write_info.cb, socket->write_info.opaque); - grpc_iomgr_add_delayed_callback(socket->shutdown_iocb, 0); + grpc_iomgr_add_delayed_callback(&socket->shutdown_closure, 0); } gpr_mu_unlock(&socket->state_mu); return callbacks_set; diff --git a/src/core/iomgr/socket_windows.h b/src/core/iomgr/socket_windows.h index 8fd8ae97b6..d5fee39604 100644 --- a/src/core/iomgr/socket_windows.h +++ b/src/core/iomgr/socket_windows.h @@ -39,6 +39,8 @@ #include #include +#include "src/core/iomgr/iomgr.h" + /* This holds the data for an outstanding read or write on a socket. The mutex to protect the concurrent access to that data is the one inside the winsocket wrapper. */ @@ -94,7 +96,7 @@ typedef struct grpc_winsocket { wait for. The socket will be collected at that time. */ int orphan; - grpc_iomgr_closure shutdown_iocb; + grpc_iomgr_closure shutdown_closure; } grpc_winsocket; /* Create a wrapped windows handle. This takes ownership of it, meaning that -- cgit v1.2.3