[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ftp mget hangs



Brian May <bmay@csse.monash.edu.au> writes:

> >>>>> "Assar" == Assar Westerlund <assar@sics.se> writes:
> 
>     Assar> Can you try to see what happens to the ftpd?  It seems it
>     Assar> closes its end of the connection (thus the EOF).
> 
> Maybe the following will mean something to you?

Can you try the appended patch?

/assar

Index: security.c
===================================================================
RCS file: /afs/pdc.kth.se/src/packages/kth-krb/SourceRepository/appl/ftp/ftp/security.c,v
retrieving revision 1.15
diff -u -w -u -w -r1.15 security.c
--- security.c	1999/12/02 16:58:30	1.15
+++ security.c	1999/12/26 23:10:32
@@ -232,9 +232,12 @@
     data = (char*)data + len;
     
     while(length){
-	if(sec_get_data(fd, &in_buffer, data_prot) < 0)
+	int ret;
+
+	ret = sec_get_data(fd, &in_buffer, data_prot);
+	if (ret < 0)
 	    return -1;
-	if(in_buffer.size == 0) {
+	if(ret == 0 || in_buffer.size == 0) {
 	    if(rx)
 		in_buffer.eof_flag = 1;
 	    return rx;