diff options
author | chai2010 <chaishushan@gmail.com> | 2015-07-14 13:24:48 +0800 |
---|---|---|
committer | chai2010 <chaishushan@gmail.com> | 2015-07-14 13:24:48 +0800 |
commit | e55e1833bc3f8d7207d8fc71e1e7c0a822b3b45d (patch) | |
tree | 59df4dec90050aa55d1c0f60261ed791943dd9d0 /src/core/iomgr | |
parent | 478f55fe712658bf66bf79f57fc20c3861090aa5 (diff) |
fix build on windows
Diffstat (limited to 'src/core/iomgr')
-rw-r--r-- | src/core/iomgr/tcp_server_windows.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/iomgr/tcp_server_windows.c b/src/core/iomgr/tcp_server_windows.c index dfd56f9c40..e6e1d1499e 100644 --- a/src/core/iomgr/tcp_server_windows.c +++ b/src/core/iomgr/tcp_server_windows.c @@ -243,6 +243,9 @@ static void on_accept(void *arg, int from_iocp) { SOCKET sock = sp->new_socket; grpc_winsocket_callback_info *info = &sp->socket->read_info; grpc_endpoint *ep = NULL; + DWORD transfered_bytes; + DWORD flags; + BOOL wsa_success; /* The general mechanism for shutting down is to queue abortion calls. While this is necessary in the read/write case, it's useless for the accept @@ -251,9 +254,8 @@ static void on_accept(void *arg, int from_iocp) { /* The IOCP notified us of a completed operation. Let's grab the results, and act accordingly. */ - DWORD transfered_bytes = 0; - DWORD flags; - BOOL wsa_success = WSAGetOverlappedResult(sock, &info->overlapped, + transfered_bytes = 0; + wsa_success = WSAGetOverlappedResult(sock, &info->overlapped, &transfered_bytes, FALSE, &flags); if (!wsa_success) { if (sp->shutting_down) { |