freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Frediano Ziglio <freddyz77 AT tin.it>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] dblib problems
- Date: Tue, 15 Jul 2003 08:05:41 -0000
...
>
> I think the problem lies in Microsoft's semantics for connect(2). Our code
> expects BSD semantics:
>
> retval = connect(tds->s, (struct sockaddr *) &sin, sizeof(sin));
> if (retval < 0 && errno == EINPROGRESS)
> retval = 0;
>
> Microsoft doesn't return -1 and set errno. They return SOCKET_ERROR (-1),
> and say WSAGetLastError() will return WSAEWOULDBLOCK. They don't touch
> errno.
>
> Here's a quick hack:
>
> retval = connect(tds->s, (struct sockaddr *) &sin, sizeof(sin));
> # if WIN32
> if (retval < 0 && WSAGetLastError() == WSAEWOULDBLOCK)
> # else
> if (retval < 0 && errno == EINPROGRESS)
> # endif
> retval = 0;
>
> Does that make any difference?
>
I put a fix on CVS (seconds ago) using sock_errno instead of errno (just
a macro that fix this problem in write.c)
freddy77
-
[freetds] dblib problems,
Frank M. Kromann, 07/11/2003
- Re: [freetds] dblib problems, James K. Lowden, 07/12/2003
- <Possible follow-up(s)>
- Re: [freetds] dblib problems, Frank M. Kromann, 07/13/2003
- Re: [freetds] dblib problems, Frank M. Kromann, 07/14/2003
-
RE: [freetds] dblib problems,
Lowden, James K, 07/14/2003
- RE: [freetds] dblib problems, Frediano Ziglio, 07/15/2003
- RE: [freetds] dblib problems, Frank M. Kromann, 07/14/2003
-
RE: [freetds] dblib problems,
Frank M. Kromann, 07/15/2003
- RE: [freetds] dblib problems, Frediano Ziglio, 07/15/2003
-
RE: [freetds] dblib problems,
Frank M. Kromann, 07/15/2003
- RE: [freetds] dblib problems, Frediano Ziglio, 07/15/2003
-
RE: [freetds] dblib problems,
Frank M. Kromann, 07/15/2003
- RE: [freetds] dblib problems, John Anderson, 07/15/2003
-
RE: [freetds] dblib problems,
Frediano Ziglio, 07/15/2003
- RE: [freetds] dblib problems, Frediano Ziglio, 07/15/2003
- RE: [freetds] dblib problems, Frediano Ziglio, 07/15/2003
Archive powered by MHonArc 2.6.24.