<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>[PATCH] mosal_sock</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Fab</FONT>
</P>
<P><FONT SIZE=2>attached little patch for mosal sockets </FONT>
</P>
<BR>
<P><FONT SIZE=2>10x</FONT>
<BR><FONT SIZE=2>Yossi </FONT>
</P>
<P><FONT SIZE=2>Singed-off-by:Yossi Leybovich (sleybo@mellanox.co.il)</FONT>
</P>
<P><FONT SIZE=2>--- C:\sleybo\OpenIB\hw\mt23108\vapi\mlxsys\mosal\os_dep\win\mosalu_socket.c Sun Sep 04 09:42:38 2005</FONT>
<BR><FONT SIZE=2>+++ C:\sleybo\clean\hw\mt23108\vapi\mlxsys\mosal\os_dep\win\mosalu_socket.c Tue Aug 23 14:19:48 2005</FONT>
<BR><FONT SIZE=2>@@ -221,6 +221,9 @@</FONT>
<BR><FONT SIZE=2> int byte_cnt = recv( (SOCKET)sock, (char FAR *)buf, len, 0 );</FONT>
<BR><FONT SIZE=2> if (byte_cnt == SOCKET_ERROR)</FONT>
<BR><FONT SIZE=2> return -1;</FONT>
<BR><FONT SIZE=2>+ </FONT>
<BR><FONT SIZE=2>+ if (byte_cnt == 0)</FONT>
<BR><FONT SIZE=2>+ return -1; /* socket closed */</FONT>
<BR><FONT SIZE=2> else</FONT>
<BR><FONT SIZE=2> return byte_cnt;</FONT>
<BR><FONT SIZE=2> }</FONT>
<BR><FONT SIZE=2>@@ -249,6 +252,9 @@</FONT>
<BR><FONT SIZE=2> (const struct sockaddr FAR *)adrs, (int)adrs_len );</FONT>
<BR><FONT SIZE=2> if (byte_cnt == SOCKET_ERROR)</FONT>
<BR><FONT SIZE=2> return -1;</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+ if (byte_cnt == 0)</FONT>
<BR><FONT SIZE=2>+ return -1; /* socket closed */</FONT>
<BR><FONT SIZE=2> else</FONT>
<BR><FONT SIZE=2> return byte_cnt;</FONT>
<BR><FONT SIZE=2> }</FONT>
</P>
<P><FONT FACE="Arial" SIZE=2 COLOR="#000000"></FONT>
</BODY>
</HTML>