curl-users
RE: 7.9.6 sparc-sun-solaris2.4 ftp timeout after connect?
Date: Mon, 29 Apr 2002 08:53:45 -0400
> > Solaris>./curl -vqm 30 -u UUUU:PPPPPP -T /etc/profile
> ftp://aix//tmp/rich
> > * About to connect() to aix:21
> > * Connected to aix (198.136.170.66) port 21
> >
> > [roughly 3-5 second pause here...]
> >
> > * Closing connection #0
> > curl: (28) Connection aborted
To catch the list up on this, we've added debug code and
determined that the first connection read on an FTP
upload is returning EINVAL. I do believe that there is
something wrong with the network setup on this host,
but 6.5.2 works, so I want to see 7.9.6 work too!
Daniel thinks this is probably due to doing non-blocking
I/O on this old Sun box. Bjorn Reese concurs, suggesting
that fcntl(O_NONBLOCK) is broken and that we try
ioctl(FIONBIO) instead. He suggests, in connect.c:
#if defined(HAVE_O_NONBLOCK) && (defined(sun) && !defined(__SVR4))
# undef HAVE_O_NONBLOCK
# define HAVE_O_FIONBIO
#endif
added just ahead of geterrno().
Solaris>src/curl -vqm 30 -u UU:PP -T /etc/profile ftp://aix//tmp/rich
* About to connect() to aix:21
* Connected to aix (198.136.170.66) port 21
* sockfd is 4
* select/read loop cached=0 timeout=30
[delay]
* select ok, read FD_ISSET=16
* reading 20480 bytes
* sreading fd 4 for 20480 bytes
* sread result=-1 errno=22
* read result=0 gotbytes=-1 errno=22
* Closing connection #0
curl: (28) Connection aborted gotbytes=-1 errno=22
:(
Rich
Received on 2002-04-29