rpcrt4: Take care of EINTR on send/recv

Bruno Jesus 00cpxxx at gmail.com
Wed Jun 11 23:52:28 CDT 2014


-------------- next part --------------
diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index c073a95..192393d 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -1464,6 +1464,8 @@ static int rpcrt4_conn_tcp_read(RpcConnection *Connection,
       return -1;
     else if (r > 0)
       bytes_read += r;
+    else if (errno == EINTR)
+      continue;
     else if (errno != EAGAIN)
     {
       WARN("recv() failed: %s\n", strerror(errno));
@@ -1489,6 +1491,8 @@ static int rpcrt4_conn_tcp_write(RpcConnection *Connection,
     int r = send(tcpc->sock, (const char *)buffer + bytes_written, count - bytes_written, 0);
     if (r >= 0)
       bytes_written += r;
+    else if (errno == EINTR)
+      continue;
     else if (errno != EAGAIN)
       return -1;
     else


More information about the wine-patches mailing list