[Mono-list] Socket.SendTo fix
Jerome Laban
jlaban@wanadoo.fr
Sat, 1 Mar 2003 01:36:58 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_069D_01C2DF93.0CE13EB0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_069E_01C2DF93.0CE13EB0"
------=_NextPart_001_069E_01C2DF93.0CE13EB0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi monoers,
Here is a patch for the=20
Socket.SendTo(byte[] buffer, int size,
SocketFlags flafs, EndPoint remote_end)=20
overload. The inner code was incorrectly calling an other Socket.SendTo =
overload with an invalid offset.
In this overload, it is by default set to 0.
Can someone commit it if ok ?
Jerome.
------=_NextPart_001_069E_01C2DF93.0CE13EB0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hi monoers,</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2> Here is a patch for the =
</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2><FONT face=3DCourier>Socket.SendTo(byte[] buffer, =
int=20
size,</FONT></FONT></DIV>
<DIV><FONT size=3D2><FONT face=3DCourier> SocketFlags =
flafs,=20
EndPoint remote_end) </FONT></FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT> </DIV>
<DIV><FONT face=3DTahoma size=3D2>overload. The inner code was =
incorrectly calling=20
an other Socket.SendTo overload with an invalid offset.</FONT></DIV>
<DIV><FONT size=3D2>In this overload, it is by default set to =
0.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Can someone commit it if ok ?</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Jerome.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_001_069E_01C2DF93.0CE13EB0--
------=_NextPart_000_069D_01C2DF93.0CE13EB0
Content-Type: application/octet-stream;
name="socket.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="socket.diff"
Index: class/System/System.Net.Sockets/Socket.cs=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /mono/mcs/class/System/System.Net.Sockets/Socket.cs,v=0A=
retrieving revision 1.12=0A=
diff -u -r1.12 Socket.cs=0A=
--- class/System/System.Net.Sockets/Socket.cs 28 Feb 2003 08:00:46 -0000 =
1.12=0A=
+++ class/System/System.Net.Sockets/Socket.cs 1 Mar 2003 00:34:39 -0000=0A=
@@ -896,7 +896,7 @@=0A=
=0A=
public int SendTo(byte[] buffer, int size, SocketFlags flags,=0A=
EndPoint remote_end) {=0A=
- return(SendTo(buffer, size, buffer.Length, flags,=0A=
+ return(SendTo(buffer, 0, size, flags,=0A=
remote_end));=0A=
}=0A=
=0A=
------=_NextPart_000_069D_01C2DF93.0CE13EB0--