cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Persistant Connectins testing

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 27 Nov 2001 15:24:59 +0100 (MET)

On Tue, 27 Nov 2001, Dimitris Sarris wrote:

> When I execute the above, it crashes at the first call of
> "curl_easy_perform". I debugged with dbx and I found that it crashes
> inside the "Curl_getaddrinfo", at line 831 of the "ftp.c" :
>
> 831: if(gethostbyaddr_r((char *) &address,
> sizeof(address), AF_INET,
> (struct hostent *)hostent_buf,
> hostent_buf + sizeof(*answer)))

Do you know why this particular code crashes? I can only think of one problem
here:

The 'address' variable is an "unsigned long" type while the man page says it
should be using the in_addr_t type. In a 64 bit architecture, it might make a
difference if the in_addr_t isn't a typedef'ed long.

Could it be this?

> The strangest thing is that your example runs without a problem. :-!

That is truly weird.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-11-27