You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Chris Demetriou <c....@gmail.com> on 2005/10/11 22:06:39 UTC
[patch] windows apr_socket_send() *len on error
Sorry, guess i sent this with a poorly-formed subject last time around.
(Patch included as an attachment because I can't send it in a way that
i'm sure won't screw up spacing...)
Please let me know if i'm submitting this in a less-than-optimal way.
(I think I'm following the guidelines on
http://apr.apache.org/patches.html...)
thanks,
chris
> From: Chris Demetriou <c....@gmail.com>
> Date: Sep 28, 2005 12:29 PM
> Subject: patch needed for windows apr_socket_send()
> To: dev@apr.apache.org
>
>
> when an error occurs, *len isn't set to 0 (as is done for all other targets).
>
> looked over all the other send/recv calls in the windows code, i
> didn't notice others that were missing.
>
> (found it doing non-blocking I/O when the receiver wasn't reading its
> data and the socket buffer filled.)
>
>
> cgd
Re: [patch] windows apr_socket_send() *len on error
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Your patch submission was great, thank you Chris, and sorry it's taken a while
to get back to this patch.
Yours,
Bill
Chris Demetriou wrote:
> Sorry, guess i sent this with a poorly-formed subject last time around.
>
> (Patch included as an attachment because I can't send it in a way that
> i'm sure won't screw up spacing...)
>
> Please let me know if i'm submitting this in a less-than-optimal way.
> (I think I'm following the guidelines on
> http://apr.apache.org/patches.html...)
>
>
> thanks,
>
> chris
>
>
>>From: Chris Demetriou <c....@gmail.com>
>>Date: Sep 28, 2005 12:29 PM
>>Subject: patch needed for windows apr_socket_send()
>>To: dev@apr.apache.org
>>
>>
>>when an error occurs, *len isn't set to 0 (as is done for all other targets).
>>
>>looked over all the other send/recv calls in the windows code, i
>>didn't notice others that were missing.
>>
>>(found it doing non-blocking I/O when the receiver wasn't reading its
>>data and the socket buffer filled.)
>>
>>
>>cgd
>>
>>
>>------------------------------------------------------------------------
>>
>>Only in apr-1.2.1: config.nice
>>diff -upr apr-1.2.1-clean/network_io/win32/sendrecv.c apr-1.2.1/network_io/win32/sendrecv.c
>>--- apr-1.2.1-clean/network_io/win32/sendrecv.c 2005-06-12 10:54:25.000000000 -0700
>>+++ apr-1.2.1/network_io/win32/sendrecv.c 2005-09-28 12:22:08.000000000 -0700
>>@@ -55,6 +55,7 @@ APR_DECLARE(apr_status_t) apr_socket_sen
>> #endif
>> if (rv == SOCKET_ERROR) {
>> lasterror = apr_get_netos_error();
>>+ *len = 0;
>> return lasterror;
>> }
>>