curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Primary IP

From: Michael via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 22 Mar 2017 10:15:13 +0000 (UTC)

curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP,&ip);curl_easy_setopt(curl, CURLOPT_READDATA, &ip);
like this it's the same.

      From: Frank Gevaerts <frank_at_gevaerts.be>
 To: Michael <scrat_here_at_yahoo.com>; libcurl development <curl-library_at_cool.haxx.se>
 Sent: Wednesday, March 22, 2017 10:44 AM
 Subject: Re: Primary IP
   
On Wed, Mar 22, 2017 at 09:32:34AM +0000, Michael via curl-library wrote:
>
> HiI get nothing returned:
> char *ip;...
> curl_easy_setopt(curl, CURLOPT_READDATA,curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP,&ip));...does primary_ip work at all or am I doing something wrong?Thanks

You're calling curl_easy_setopt() with a CURLINFO_* value. You probably
want curl_easy_getinfo()

Frank

> -------------------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette:  https://curl.haxx.se/mail/etiquette.html

-- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
   

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-03-22