cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

Re: CURLINFO_LASTSOCKET returns error 56

From: Karel K <karelsemail_at_gmail.com>
Date: Mon, 2 Nov 2009 20:05:25 +0100

>> After removing a small bug in the upstream code, it did actually work
>> perfect on my linux box.
>
> Oh, nice!
I am trying to contact the author to keep upstream in shape.

>> However when run on windows is breaks. The line
>>
>> ret = curl_easy_getinfo(hnd, CURLINFO_LASTSOCKET, &sckt);
>>
>> returns a ret of 56, which is, according to strerror(ret):  File locking
>> deadlock error?

> You need to use curl_easy_strerror() to get the error message, it is a
> libcurl error not a libc one.

Makes sense. I did copy this (strerror) from an example in the curl
distribution...
doc/examples/sendrecv.c, line 75. Maybe you want to update this line.

    /* Extract the socket from the curl handle - we'll need it
     * for waiting */
    res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockfd);

    if(CURLE_OK != res)
    {
      printf("Error: %s\n", strerror(res));
      return 1;
    }

> Or you can just read the include/curl.h header to figure out what 56 is.
CURLE_RECV_ERROR, /* 56 - failure in receiving network data */

Any clue how I can further debug this problem??

Thanks,

Karel.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-02

These mail archives are generated by hypermail.

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET