[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: Joe Orton <joe_at_manyfish.co.uk>
Date: 2002-12-22 18:59:35 CET

On Sun, Dec 22, 2002 at 06:34:15PM +0100, Branko Čibej wrote:
> Joe Orton wrote:
...
> >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.

OK - a few questions: can the return value from WSAGetLastError() be
passed to strerror() to get useful error strings, and compared with
ECONNRESET to detect a connection reset? Is select() one of the
functions which doesn't use errno on Win32?

> 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..

There is one errno assignment in ne_socket.c but it appears to be
redundant, so it doesn't look like that will be needed.

Thanks!

joe

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 22 22:16:45 2002

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.