Re: ftpget 1.1.beta[789] on linux doesn't work

From: Duane Wessels <wessels>
Date: Thu, 24 Oct 96 22:00:23 -0700 writes:

>Hi Duane & squid-users,
>Some days ago I send you a mail about ftpget failing with some
>ftp-hosts... now I'm sure I was wrong, I can't ftp _any_ host :-(
>connect() returns -1 EINPROGRESS (Operation now in progress)... it
>sounds strange, so I have strace'd both versions 1.1.beta6 and
>1.1.beta9. Version beta6 works ok (?) but beta9 doesn't, and both
>connects return -1 EINPROGRESS (???). Here there are a bit of these
>BTW, I've built it from full source without patches, in two machines,
>with Linux-2.0.21 and 2.0.23, and no changes.
>Any ideas?
>Anybody has a Linux system with ftpget 1.1.beta[789] working?

Hi Roberto,

Thanks for the excellent debugging. I now see why it is failing.

   732 for (;;) {
   733 debug(38, 5, "Connecting FD %d to: %s, port %d, len = %d\n", fd,
   734 inet_ntoa(S->sin_addr),
   735 (int) ntohs(S->sin_port),
   736 len);
   737 y = connect(fd, (struct sockaddr *) S, len);
   738 debug(38, 7, "connect returned %d\n", y);
   739 if (y < 0)
   740 debug(38, 7, "connect: %s\n", xstrerror());
   741 if (y >= 0)

The call to debug() on line 737 makes some C library calls which
look for some Locale stuff and ends up changing the value of errno!

connect(4, {sin_family=AF_INET, sin_port=htons(21), sin_addr=inet_addr("195.76.4
6.40")}, 16) = -1 EINPROGRESS (Operation now in progress)
write(2, "96/10/25 05:56:37| connect retur"..., 39) = 39
open("/usr/share/locale/C/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or d
brk(0x807e000) = 0x807e000

So later when we check errno it seems like connect() returned ENOENT.
I'll be if you remove the deubg() calls in connect_with_timeout2()
it works great.

Meanwhile, I'll fix ftpget to account for this.

Duane W.
Received on Thu Oct 24 1996 - 22:00:24 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:33:21 MST