curl-library
Re: Correct way to retrieve error code in case of multi interface
Date: Mon, 06 Feb 2012 17:03:26 +0400
On 02/05/2012 07:30 PM, Lijo Antony wrote:
> Currently I am using curl_easy_getinfo with CURLINFO_RESPONSE_CODE and
> CURLINFO_OS_ERRNO to do this. But this doesn't give the specific error
> code like curl_easy_perform would return. For example, when network is
> down, I get CURLINFO_RESPONSE_CODE and CURLINFO_OS_ERRNO as 0, even
> though I can see debug log as "Could not resolve host: <url> (Could not
> contact DNS servers)".
>
> In error scenarios like these (dns error, connect error, ssl errors
> etc), I would like to get the specific error code. How can I achieve this?
>
I have found the CURLcode variable "result", which is present inside the
CURLMsg structure returned by the function curl_multi_info_read. I guess
I was looking for this and is giving me the specific error codes as
expected.
Thanks,
-lijo
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-02-06