cvs: /php4/ext/ftp ftp.c
| From: | Andrew Skalski | Date: | Wed, 16 Feb 2000 16:07:57 +0000 |
| Subject: | cvs: /php4/ext/ftp ftp.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-10358@lists.php.net to get a copy of this message | ||
askalski Wed Feb 16 08:07:57 2000 EDT
Modified files:
/php4/ext/ftp ftp.c
Log:
recognize 125 as success for put/get commands
Index: php4/ext/ftp/ftp.c
diff -u php4/ext/ftp/ftp.c:1.13 php4/ext/ftp/ftp.c:1.14
--- php4/ext/ftp/ftp.c:1.13 Sat Nov 27 12:58:33 1999
+++ php4/ext/ftp/ftp.c Wed Feb 16 08:07:27 2000
@@ -28,7 +28,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ftp.c,v 1.13 1999/11/27 20:58:33 askalski Exp $ */
+/* $Id: ftp.c,v 1.14 2000/02/16 16:07:27 askalski Exp $ */
#include "php.h"
@@ -484,7 +484,7 @@
if (!ftp_putcmd(ftp, "RETR", path))
goto bail;
- if (!ftp_getresp(ftp) || ftp->resp != 150)
+ if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125))
goto bail;
if ((data = data_accept(data)) == NULL)
@@ -546,7 +546,7 @@
if (!ftp_putcmd(ftp, "STOR", path))
goto bail;
- if (!ftp_getresp(ftp) || ftp->resp != 150)
+ if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125))
goto bail;
if ((data = data_accept(data)) == NULL)
@@ -1087,7 +1087,7 @@
if (!ftp_putcmd(ftp, cmd, path))
goto bail;
- if (!ftp_getresp(ftp) || ftp->resp != 150)
+ if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125))
goto bail;
/* pull data buffer into tmpfile */