Patch fix-inappropriate-ftp-data-connection-failure-error-message for FTP related Bug #77957
Patch version 2019-05-01 15:28 UTC
Return to Bug #77957 |
Download this patch
Patch Revisions:
Developer: sadaakikawata@sencorp.co.jp
diff --git a/main/network.c b/main/network.c
index 7eccb36047..b7476ef944 100644
--- a/main/network.c
+++ b/main/network.c
@@ -352,6 +352,9 @@ PHPAPI int php_network_connect_socket(php_socket_t sockfd,
if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (char*)&error, &len) != 0) {
ret = -1;
}
+ if (error != 0) {
+ errno = error;
+ }
} else {
/* whoops: sockfd has disappeared */
ret = -1;
|