[Openib-windows] [PATCH] mosal_sock
Yossi Leybovich
sleybo at mellanox.co.il
Thu Sep 15 03:22:49 PDT 2005
Fab
attached little patch for mosal sockets
10x
Yossi
Singed-off-by:Yossi Leybovich (sleybo at mellanox.co.il)
--- C:\sleybo\OpenIB\hw\mt23108\vapi\mlxsys\mosal\os_dep\win\mosalu_socket.c
Sun Sep 04 09:42:38 2005
+++ C:\sleybo\clean\hw\mt23108\vapi\mlxsys\mosal\os_dep\win\mosalu_socket.c
Tue Aug 23 14:19:48 2005
@@ -221,6 +221,9 @@
int byte_cnt = recv( (SOCKET)sock, (char FAR *)buf, len, 0 );
if (byte_cnt == SOCKET_ERROR)
return -1;
+
+ if (byte_cnt == 0)
+ return -1; /* socket closed */
else
return byte_cnt;
}
@@ -249,6 +252,9 @@
(const struct sockaddr FAR *)adrs, (int)adrs_len );
if (byte_cnt == SOCKET_ERROR)
return -1;
+
+ if (byte_cnt == 0)
+ return -1; /* socket closed */
else
return byte_cnt;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20050915/4106ff56/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mosal_sock.patch
Type: application/octet-stream
Size: 629 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20050915/4106ff56/attachment.obj>
More information about the ofw
mailing list