cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl_multi_info_read()

From: Andy Hobbs <andy_at_trogs.org.uk>
Date: Tue, 01 Jun 2004 17:34:50 +0100

Hi,

I am trying to query errors on my transfers using curl_multi_info_read()
and am not getting very far.

I am calling curl_multi_perform(), to run a single request, which
returns CURLM_OK. however the request fails. If I try it manually using
telnet (to port 80) I get "no route to host" as an error. I am trying to
get the error out of libcurl and failing.

my code looks something like this

   int retval = 0; // success my default

   // run the http requests
   while ((result = curl_multi_perform(multiHandle, stillRunning)) ==
CURLM_CALL_MULTI_PERFORM)
   {
   }
               
   if (result != CURLM_OK)
   {
      retval = -1;
   }
   // Check there were no errors on any of the handles
   else
   {
      info = curl_multi_info_read(multiHandle, &msgOnQueue);

      if (info->msg == <<check for something here>>)
         retval = -1;
   }

What do I need to check in the resulting message returned? I assume
info->msg contains a code to check, however I can't find any
documentation on this. Is it CURL_OK if there was no error and something
else if there was? I can't find any documentation on the CURLMSG or the
information provided by this call. I have had a look at multi.c to try
and work it out for myself but also haven't got very far with that.

Thanks for your help

Andy

-- 
andy_at_trogs.org.uk
I'd like to meet the guy who invented beer and see what he's working on
now
Received on 2004-06-01