com php-src: Fix FTPS passive mode of data channel event poll: ext/ftp/ftp.c
| From: | Nikita Popov | Date: | Fri, 08 Feb 2019 08:50:29 +0000 |
| Subject: | com php-src: Fix FTPS passive mode of data channel event poll: ext/ftp/ftp.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-104477@lists.php.net to get a copy of this message | ||
Commit: 3b09123de3de656d195dd31e84668edffadcaaba
Author: YanTao <admin@yantao.info> Fri, 8 Feb 2019 11:41:41 +0800
Committer: Nikita Popov <nikita.ppv@gmail.com> Fri, 8 Feb 2019 09:50:29 +0100
Parents: e27301c7b37f6a1643a0dc1966919bd62a32bc74
Branches: PHP-7.2 PHP-7.3 PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3b09123de3de656d195dd31e84668edffadcaaba
Log:
Fix FTPS passive mode of data channel event poll
Bugfix: when using passive mode of FTPS protocol, data channel events
should be polled when creating data connection channel, instead of polling
the event of ftp's self control channel, which may cause ftp transfer
problem while using ftps and passive mode.
Changed paths:
M ext/ftp/ftp.c
Diff:
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index fd8b736..8f9f737 100644
--- a/ext/ftp/ftp.c
+++ b/ext/ftp/ftp.c
@@ -1859,7 +1859,7 @@ data_accepted:
php_pollfd p;
int i;
- p.fd = ftp->fd;
+ p.fd = data->fd;
p.events = (err == SSL_ERROR_WANT_READ) ? (POLLIN|POLLPRI) : POLLOUT;
p.revents = 0;