cURL / Mailing Lists / curl-library / Single Mail

curl-library

connect error reporting

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Fri, 7 May 2004 22:55:41 +0200

libcurl now reports failed connections on Windows as:
* Connect failed; No error

"No error" comes from the sclose() call since errno's on
Windows doesn't work as on Unix (where errno is only set
on failure).

AFAICS, since connect() is non-blocking, the error must be
obtained from getsockopt(..SO_ERROR), but verifyconnect()
doesn't do this on Windows. Not sure why that is ifdef'ed out,
but that function works fine here.

Attached is a little patch that gives correct error response.
Also a minor detail for ldap.[ch]; no Curl_ldap_done().

--gv

Received on 2004-05-18