clang-format

pull/6897/head
Craig Tiller 9 years ago
parent 5b9ce77d9f
commit 95b9064d78
  1. 7
      src/core/lib/iomgr/socket_windows.c
  2. 4
      src/core/lib/iomgr/socket_windows.h
  3. 5
      src/core/lib/iomgr/tcp_client_windows.c

@ -98,7 +98,9 @@ static void destroy(grpc_winsocket *winsocket) {
}
static bool check_destroyable(grpc_winsocket *winsocket) {
return winsocket->destroy_called == true && winsocket->write_info.closure == NULL && winsocket->read_info.closure == NULL;
return winsocket->destroy_called == true &&
winsocket->write_info.closure == NULL &&
winsocket->read_info.closure == NULL;
}
void grpc_winsocket_destroy(grpc_winsocket *winsocket) {
@ -139,7 +141,8 @@ void grpc_socket_notify_on_read(grpc_exec_ctx *exec_ctx, grpc_winsocket *socket,
socket_notify_on_iocp(exec_ctx, socket, closure, &socket->read_info);
}
void grpc_socket_become_ready(grpc_exec_ctx *exec_ctx, grpc_winsocket *socket, grpc_winsocket_callback_info *info) {
void grpc_socket_become_ready(grpc_exec_ctx *exec_ctx, grpc_winsocket *socket,
grpc_winsocket_callback_info *info) {
GPR_ASSERT(!info->has_pending_iocp);
gpr_mu_lock(&socket->state_mu);
if (info->closure) {

@ -117,6 +117,8 @@ void grpc_socket_notify_on_read(grpc_exec_ctx *exec_ctx,
grpc_winsocket *winsocket,
grpc_closure *closure);
void grpc_socket_become_ready(grpc_exec_ctx *exec_ctx, grpc_winsocket *winsocket, grpc_winsocket_callback_info *ci);
void grpc_socket_become_ready(grpc_exec_ctx *exec_ctx,
grpc_winsocket *winsocket,
grpc_winsocket_callback_info *ci);
#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_WINDOWS_H */

@ -106,8 +106,9 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) {
if (error == GRPC_ERROR_NONE && socket != NULL) {
DWORD transfered_bytes = 0;
DWORD flags;
BOOL wsa_success = WSAGetOverlappedResult(socket->socket, &socket->write_info.overlapped,
&transfered_bytes, FALSE, &flags);
BOOL wsa_success =
WSAGetOverlappedResult(socket->socket, &socket->write_info.overlapped,
&transfered_bytes, FALSE, &flags);
GPR_ASSERT(transfered_bytes == 0);
if (!wsa_success) {
error = GRPC_WSA_ERROR(WSAGetLastError(), "ConnectEx");

Loading…
Cancel
Save