[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [azverkan@yahoo.com: Joe Orton please read: Overrrun a neon buffer size during svn merge URL URL]

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-12-22 18:34:15 CET

Joe Orton wrote:

>On Fri, Dec 20, 2002 at 05:00:07PM -0600, Ben Collins-Sussman wrote:
>
>
>>Joe Orton <joe@manyfish.co.uk> writes:
>>
>>
>>
>>>The other time readline is used is for reading response header fields:
>>>I'd question whether it's reasonable for a response header field to be
>>>longer than 4096 chars too. Is mod_dav_svn really sending these in some
>>>case? Please send network/debug traces!
>>>
>>>
>>Joe, here's what you need:
>>
>> http://newton.ch.collab.net/~sussman/report_dialogue.txt
>>
>> http://newton.ch.collab.net/~sussman/neon_log.txt
>>
>>
>
>Thanks Ben - it looks like the client is on Win32 here? It's a known bug
>in neon that recv() errors aren't handled properly on Win32 - this is
>hiding the real error message with
>
> "Could not read response body: No error"
>
>so I can't tell what's really gone wrong; this needs a Win32-savvy
>person to go and fix. (On Win32 it seems that recv() doesn't use errno;
>ne_socket.c:read_raw() and write_raw() both need changing for this I
>suspect)
>
>

Judjung by the Windows Socket API docs, /nont/ of the socket functions
use errno on Windows. There's a (non-standard, of course) function that
returns the latest error code. Do you think this would work?

#ifdef WIN32
#define NEON_SOCK_ERRNO() errno
#else
#define NEON_SOCK_ERRNO() WSAGetLastError()
#endif

Then use that macro wherever errno is being checked after a socket call.

Oh, BTW: There's a symmetric function, WSASetLastError(), that can be
used to change the code that WSAGetLastError returns. I don't know if
you need that (i.e., if you do eny errno assignments within Neon), but
you can't cal it without first calling (yet another) Windows-specific
socket lib initialization function..

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 22 18:34:55 2002

This is an archived mail posted to the Subversion Dev mailing list.