cURL / Mailing Lists / curl-library / Single Mail

curl-library

CURLOPT_IPRESOLVE problem

From: Andrés García <fandom_at_retemail.es>
Date: Thu, 18 Dec 2003 18:03:04 +0100

Hi,

I am trying out the CURLOPT_IPRESOLVE problem, but
I can't get it right, even something a simple as:

int main(void)
{
  CURL *curl;
  CURLcode res;

  curl = curl_easy_init();
  if(curl) {
    curl_easy_setopt(curl, CURLOPT_URL, "127.0.0.1");
    res = curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
    if(res) {
        printf("Error: %d\n",res);
    }
    res = curl_easy_perform(curl);
    curl_easy_cleanup(curl);
  }
  return 0;
}

returns error 2 in curl_easy_setopt whenever I try to set the option.

Anything I am doing wrong?

Andres

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-18