Subject: ftpd stuck in read when in STOR mode
To: None <tech-userlevel@NetBSD.ORG>
From: Gerryt <gerryt@portal.ca>
List: tech-userlevel
Date: 03/12/1998 17:01:13
We have an ftp server for clients to upload web pages to
their home directories. SOME people experience a gradual
slow down in transfer rate until the session stops altogether.
They disconnect and try again - and again and again.
Trouble is, OUR side stays alive stuck in read() everytime
they do this. : <
Its bad enough that uploads fail but it worse when they
dont know they are dead....
Our ftp server - an i386 1.2.1 box (ftpd Version 7.02) gets stuck here in
ftpd.c :
static int
receive_data(instr, outstr)
FILE *instr, *outstr;
{
int c, cnt, bare_lfs;
char buf[BUFSIZ];
#ifdef __GNUC__
(void) &bare_lfs;
#endif
bare_lfs = 0;
transflag++;
if (setjmp(urgcatch)) {
transflag = 0;
return (-1);
}
switch (type) {
case TYPE_I:
case TYPE_L:
while ((cnt = read(fileno(instr), buf, sizeof(buf))) > 0) {
/* Help! I'm stuck here! */
if (write(fileno(outstr), buf, cnt) != cnt)
goto file_err;
byte_count += cnt;
}
if (cnt < 0)
goto data_err;
transflag = 0;
return (0);
>From home I have become a Windows 95 (ugh) person and am able to upload 3-4 MB
files in ascii or binary mode no problem. Same with my old BSD/OS 2.1 box.. Our
former Web designer was the first to bring this to my attention - he uses a Mac
hmmm.. Not sure about the others.
Anyone?