summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYanTao <admin@yantao.info>2019-02-08 11:41:41 +0800
committerNikita Popov <nikita.ppv@gmail.com>2019-02-08 09:50:29 +0100
commit3b09123de3de656d195dd31e84668edffadcaaba (patch)
tree41eb59b681d3defd3ae47dff077260a4dcce1349
parente27301c7b37f6a1643a0dc1966919bd62a32bc74 (diff)
downloadphp-git-3b09123de3de656d195dd31e84668edffadcaaba.tar.gz
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.
-rw-r--r--ext/ftp/ftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index fd8b7363a7..8f9f737678 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;