cURL / Mailing Lists / curl-library / Single Mail


Re: [cURLpp] curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies) fails

From: Igor <>
Date: Thu, 24 Jan 2008 18:35:18 +0300

Hello libcurl,

> Hi,

> I am still unable to run the attached code successfully even with 7.17.0.
> Basically I am trying to build and execute curl-7.17.0
> /docs/examples/cookie_interface.c
> It fails in the function static void print_cookies(CURL *curl) at line
> number 28
> res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
> It says :
> Curl curl_easy_getinfo failed: a libcurl function was given a bad
> argument

  That most probably mean that your library was compiled without
  CURLIFNO_COOKIELIST macro. Wile looking through different
  libcurl versions I've noticed that some packages by reasons
  unknown lack some macros. They disappear in one packages and then
  reappear in another. My guess is that you have had that kind of
  library. Check out your curl.h. That only can happen if you include
  curl.h that does have CURLIFNO_COOKIELIST but you link your app with
  library that was compiled with curl.h that didn't have
    *param_slistp = Curl_cookie_list(data);
    if((data->state.lastconnect != -1) &&
       (data->state.connects[data->state.lastconnect] != NULL))
      *param_longp = data->state.connects[data->state.lastconnect]->
      *param_longp = -1;

    that is your case.

Best regards,
Received on 2008-01-24