cURL / Mailing Lists / curl-library / Single Mail


Re: Daily builds for AIX - possibly

From: Tor Arntsen <>
Date: Wed, 4 Feb 2004 12:42:41 +0100

(The mailing list server bounced versions of this message twice yesterday,
I'm trying again. Seems like it's having major problems. I'm also missing
messages I can see in the web archive, even when I have actually received
"later" messages.)

On Feb 2, 22:44, Daniel Stenberg wrote:
>On Mon, 2 Feb 2004, Tor Arntsen wrote:
>> > PWD
>> < 257 "/nowhere/anywhere" is current directory
>> * Entry path is '/nowhere/anywhere'
>> curl: (30)
>> * Closing connection #0
>Hey, this is a clue we were looking for!
>1. It returns back when it is supposed to send the 'PORT' command (next after
> the PWD).
>2. It returns error code 30, with no error message. Error 30 is
> CURLE_FTP_PORT_FAILED. I could find three cases where this happens (it
> really should never be done, I mean with no error message). They are all in
> the ftp_use_port() function.

It turns out that it's mainly the IPV6 stuff that fails. The first stopblock
was an obvious error in the call to getaddrinfo(), the second parameter is
(char*)"0" It should be NULL (although (char*)0 would work too, i.e. no ""),
ref. Linux manpage (the AIX manpage says the same thing):

       int getaddrinfo(const char *node, const char *service,
       The node or service parameter, but not both, may be NULL.

Fixing that got me past the getaddrinfo() call (see patch at the end), but
there are still problems further down in the ftp_use_port() function, possibly
because of problems with some of the return values from both getaddrinfo()
and other calls.
I'm not sure if IPV6 on AIX has bugs, I'll debug this further when I'll
get a bit more time available.

Compiling withouth ipv6 got rid of most of the AIX problems, the rest were
SSL tests (300 301 304 306).
I've uploaded more testsets (, without ipv6 as
well as withouth ssl.


Index: lib/ftp.c
RCS file: /repository/curl/lib/ftp.c,v
retrieving revision 1.223
diff -u -p -r1.223 ftp.c
--- lib/ftp.c 3 Feb 2004 09:52:32 -0000 1.223
+++ lib/ftp.c 3 Feb 2004 18:46:16 -0000
@@ -1140,7 +1140,7 @@ CURLcode ftp_use_port(struct connectdata
   hints.ai_socktype = SOCK_STREAM;
   hints.ai_flags = AI_PASSIVE;
- if (getaddrinfo(hbuf, (char *)"0", &hints, &res))
+ if (getaddrinfo(hbuf, NULL, &hints, &res))
   portsock = -1;

The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
Received on 2004-02-04