Skip to content

Commit

Permalink
Fix FTPS passive mode of data channel event poll
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tsoftware-org authored and nikic committed Feb 8, 2019
1 parent e27301c commit 3b09123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/ftp/ftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1859,7 +1859,7 @@ data_accept(databuf_t *data, ftpbuf_t *ftp)
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;

Expand Down

0 comments on commit 3b09123

Please sign in to comment.