Re: RE: Bug#329159: sitecopy: 0.15.1-1 is fine

Joe Orton <[email protected]> Thu, 22 Sep 2005 01:54:43 +0100
Newsgroups gmane.comp.web.sitecopy
Message-ID <[email protected]>
Oleksandr reported the details privately (thanks); here is the fix which 
will go in for 0.16.1:

Index: src/ftp.c
===================================================================
--- src/ftp.c	(revision 694)
+++ src/ftp.c	(working copy)
@@ -341,6 +341,7 @@
 	return FTP_CLOSED;
     case 421: /* service denied; PI connection closure */
         ne_sock_close(sess->pisock);
+        sess->pisock = NULL;
         sess->connected = 0;
         return FTP_BROKEN;
     case 553: /* couldn't create directory */
@@ -1063,8 +1064,10 @@
     }
 
     if (authenticate(sess) != FTP_OK) {
-        ne_sock_close(sess->pisock);
-        sess->pisock = NULL;
+        if (sess->connected) {
+            ne_sock_close(sess->pisock);
+            sess->pisock = NULL;
+        }
 	return FTP_LOGIN;
     }
 

_______________________________________________
sitecopy maillist  -  [email protected]
http://dav.lyra.org/mailman/listinfo/sitecopy