curl-library
Re: not getting error details on connection failure
Date: Sun, 16 Mar 2014 23:25:44 +0100 (CET)
On Thu, 13 Mar 2014, Keith Trummel wrote:
> Now I was able to work around this by doing the following. If I get an
> error and it is CURLE_COULDNT_CONNECT and the error buffer is empty, then I
> make a call to curl_easy_getinfo to get the OS error number. This seems to
> work, but it seems like a hack. Shouldn't I automatically get this
> information in the error buffer that I have set up?
Yes I think you should. The error buffer is a good way to pass back info that
you can't get after-the-fact so we should try to use it. I certainly will
appreciate if you can fix your case and send us a patch.
There is however no guarantee that the error buffer _will_ be used so your
work-around seems like a decent fix anyway. I'm convinced we have more error
paths that never stores anything in that buffer...
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2014-03-16