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


      From: Frank Gevaerts <[email protected]>
 To: Michael <[email protected]>; libcurl development 
<[email protected]> 
 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

Reply via email to