]> granicus.if.org Git - php/commitdiff
Fix FTPS passive mode of data channel event poll
authorYanTao <admin@yantao.info>
Fri, 8 Feb 2019 03:41:41 +0000 (11:41 +0800)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 8 Feb 2019 08:50:29 +0000 (09:50 +0100)
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.

ext/ftp/ftp.c

index fd8b7363a7a50152cdf42cf2e84d8dd69762cc08..8f9f73767824bb0aa3e2b785d9f523cc24c54446 100644 (file)
@@ -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;