Re: Compile Warning in ftp.c
| From: | Jani Taskinen | Date: | Tue, 31 Oct 2000 00:36:51 +0000 |
| Subject: | Re: Compile Warning in ftp.c | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-36503@lists.php.net to get a copy of this message | ||
I just committed another patch which adds the check also
for RETR and STOR.
Those are the commands mentioned in RFC 959 to have also
250 as possible reply from server.
--Jani
On Mon, 30 Oct 2000, Andi Gutmans wrote:
>Andrew,
>Please check out this patch.
>Also do all the other places like:
> if (!ftp_getresp(ftp) || ftp->resp != 226)
>also need the check for 250 added or is the current place the only one?
>
>Andi
>
>At 01:39 PM 10/30/00 -0500, Ignacio Vazquez-Abrams wrote:
>>I decided to be "nosy" and logged the PHP build/compile process. I found a
>>small problem:
>>
>>1) In ext/ftp:
>>
>>ftp.c: In function `ftp_genlist':
>>ftp.c:1207: warning: `or' of unmatched not-equal tests is always 1
>>
>>Oops. This looks related to the OS/390 fix (Bug #6730) a little bit back.
>>
>>--- php-4.0.4_20001027/ext/ftp/ftp.c.orig Mon Oct 30 13:34:17 2000
>>+++ php-4.0.4_20001027/ext/ftp/ftp.c Mon Oct 30 13:34:29 2000
>>@@ -1204,7 +1204,7 @@
>>
>> fclose(tmpfp);
>>
>>- if (!ftp_getresp(ftp) || ftp->resp != 226 || ftp->resp != 250) {
>>+ if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) {
>> free(ret);
>> return NULL;
>> }
>>
>>--
>>Ignacio Vazquez-Abrams <ignacio@openservices.net>
>>
>>
>>
>>--
>>PHP Development Mailing List <http://www.php.net/>
>>To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
>>For additional commands, e-mail: php-dev-help@lists.php.net
>>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>---
>Andi Gutmans <andi@zend.com>
>http://www.zend.com/
>
>
--
Joo.