[Mono-bugs] [Bug 349688] SocketFlags.Partial is not implemented correctly in Linux
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Dec 13 16:35:46 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=349688
User brian at sooloos.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=349688#c3
Brian Luczkiewicz <brian at sooloos.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #3 from Brian Luczkiewicz <brian at sooloos.com> 2008-12-13 14:35:36 MST ---
It appears that the work done under this ticket has introduced a regression:
===============================================================
/* Convert MonoSocketFlags */
static gint32 convert_socketflags (gint32 sflags)
{
gint32 flags = 0;
if (!sflags)
/* SocketFlags.None */
return 0;
if (sflags & ~(SocketFlags_OutOfBand | SocketFlags_MaxIOVectorLength |
SocketFlags_Peek |
SocketFlags_DontRoute | SocketFlags_Partial))
/* Contains invalid flag values */
return -1;
if (sflags & SocketFlags_OutOfBand)
flags |= MSG_OOB;
if (sflags & SocketFlags_Peek)
flags |= MSG_PEEK;
if (sflags & SocketFlags_DontRoute)
flags |= MSG_DONTROUTE;
#if 0
/* Ignore Partial - see bug 349688. Don't return -1, because
* according to the comment in that bug ms runtime doesn't for
* UDP sockets (this means we will silently ignore it for TCP
* too)
*/
if (sflags & SocketFlags_Partial)
#ifdef MSG_MORE
flags |= MSG_MORE;
#else
return -1;
#endif
#endif
if (sflags & SocketFlags_MaxIOVectorLength)
/* FIXME: Don't know what to do for MaxIOVectorLength query */
return -1;
return (flags ? flags : -1);
}
===============================================================
If you pass in SocketFlags_Partial to this routine (with no other flags OR'd
in), the method executes until the final return, but since it never sets any
native flags to the 'flags' variable, it ends up returning -1 and causing a
SocketException/Operation Not Supported. This doesn't seem to be consistent
with "ignoring" the flag.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list