Skip to content
Snippets Groups Projects
Commit 0c47d807 authored by David Garcia Quintas's avatar David Garcia Quintas
Browse files

fixed compilation errors on windows code.

parent a30020f0
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "src/core/iomgr/iocp_windows.h" #include "src/core/iomgr/iocp_windows.h"
#include "src/core/iomgr/iomgr.h"
#include "src/core/iomgr/iomgr_internal.h" #include "src/core/iomgr/iomgr_internal.h"
#include "src/core/iomgr/pollset.h" #include "src/core/iomgr/pollset.h"
#include "src/core/iomgr/pollset_windows.h" #include "src/core/iomgr/pollset_windows.h"
...@@ -64,15 +63,15 @@ int grpc_winsocket_shutdown(grpc_winsocket *socket) { ...@@ -64,15 +63,15 @@ int grpc_winsocket_shutdown(grpc_winsocket *socket) {
gpr_mu_lock(&socket->state_mu); gpr_mu_lock(&socket->state_mu);
if (socket->read_info.cb) { if (socket->read_info.cb) {
callbacks_set++; 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); 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) { if (socket->write_info.cb) {
callbacks_set++; 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); 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); gpr_mu_unlock(&socket->state_mu);
return callbacks_set; return callbacks_set;
......
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
#include <grpc/support/sync.h> #include <grpc/support/sync.h>
#include <grpc/support/atm.h> #include <grpc/support/atm.h>
#include "src/core/iomgr/iomgr.h"
/* This holds the data for an outstanding read or write on a socket. /* 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 The mutex to protect the concurrent access to that data is the one
inside the winsocket wrapper. */ inside the winsocket wrapper. */
...@@ -94,7 +96,7 @@ typedef struct grpc_winsocket { ...@@ -94,7 +96,7 @@ typedef struct grpc_winsocket {
wait for. The socket will be collected at that time. */ wait for. The socket will be collected at that time. */
int orphan; int orphan;
grpc_iomgr_closure shutdown_iocb; grpc_iomgr_closure shutdown_closure;
} grpc_winsocket; } grpc_winsocket;
/* Create a wrapped windows handle. This takes ownership of it, meaning that /* Create a wrapped windows handle. This takes ownership of it, meaning that
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment