php-src/ext/ftp
Christoph M. Becker 42c72ef463
Fix #79100: Wrong FTP error messages
First we need to properly clear the `inbuf`, what is an amendment to
commit d2881adcbc[1].

Then we need to report `php_pollfd_for_ms()` failures right away; just
setting `errno` does not really help, since at least in some cases it
would have been overwritten before we actually could check it.  We use
`php_socket_strerror()` to get a proper error message, and define
`ETIMEDOUT` to the proper value on Windows; otherwise we catch the
definition in errno.h, which is not compatible with WinSock.  The
proper solution for this issue would likely be to include something
like ext/sockets/windows_common.h.

Finally, we ensure that we only report warnings using `inbuf`, if it is
not empty.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=d2881adcbc9be60de7e7d45a3316b0e11b7eb1e8>.

Closes GH-6718.
2021-05-03 15:19:57 +02:00
..
tests Fix #79100: Wrong FTP error messages 2021-05-03 15:19:57 +02:00
config.m4 Fix bug #79112: IMAP can't find OpenSSL during configure 2020-01-20 09:59:27 +01:00
config.w32 Remove unused Git attributes ident 2018-07-25 00:53:25 +02:00
CREDITS
ftp.c Fix #79100: Wrong FTP error messages 2021-05-03 15:19:57 +02:00
ftp.h Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
php_ftp.c Fix #79100: Wrong FTP error messages 2021-05-03 15:19:57 +02:00
php_ftp.h Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00