Handling non-winsock flags in fhandler_socket.cc

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Handling non-winsock flags in fhandler_socket.cc

Pekka Pessi
Hello,

 I found a problem with sendmsg() failng when MSG_NOSIGNAL is used. It
looks like MSG_WINMASK is used in sendto() but not in sendmsg().

The patch that should fix the problem is made against
fhandler_socket.cc revision 1.176 ("should" because I did not get
around to compile the whole shebang). It clears extra flags when
calling ws2 functions in all cases of sendmsg(), recvmsg() and
recvfrom().

--
Pekka.Pessi@{nokia.com,iki.fi}

sendmsg-flags.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Handling non-winsock flags in fhandler_socket.cc

Corinna Vinschen-2
On Dec  7 23:19, Pekka Pessi wrote:
> Hello,
>
>  I found a problem with sendmsg() failng when MSG_NOSIGNAL is used. It
> looks like MSG_WINMASK is used in sendto() but not in sendmsg().

Thanks for the patch.  Unfortunately it's missing a ChangeLog entry and
it didn't work OOTB since it was missing curly braces, but I took the
freedom to fix it up.  The change to fhandler_socket::recvfrom was not
necessary since flags is masked at the start of the function.  However,
maybe it comes handy to keep the original flags value at one point, so
I removed this masking at the function start.

Please note that I can take this patch only because it's relatively
small.  If you would like to send bigger patches or extensions to the
Cygwin functionality at one point, you'll have to sign a copyright
assignment form and send it to Red Hat.  Please read
http://cygwin.com/contrib.html for more details about contributing.

Other than that, patch applied with changes.


Thanks again,
Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat, Inc.