mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.5'
* PHP-8.5: Fix GH-19798: XP_SOCKET XP_SSL: Incorrect condition for Win
This commit is contained in:
@@ -2219,7 +2219,6 @@ static int php_openssl_sockop_stat(php_stream *stream, php_stream_statbuf *ssb)
|
||||
static inline int php_openssl_tcp_sockop_accept(php_stream *stream, php_openssl_netstream_data_t *sock,
|
||||
php_stream_xport_param *xparam STREAMS_DC) /* {{{ */
|
||||
{
|
||||
int clisock;
|
||||
bool nodelay = false;
|
||||
zval *tmpzval = NULL;
|
||||
|
||||
@@ -2231,7 +2230,7 @@ static inline int php_openssl_tcp_sockop_accept(php_stream *stream, php_openssl_
|
||||
nodelay = true;
|
||||
}
|
||||
|
||||
clisock = php_network_accept_incoming(sock->s.socket,
|
||||
php_socket_t clisock = php_network_accept_incoming(sock->s.socket,
|
||||
xparam->want_textaddr ? &xparam->outputs.textaddr : NULL,
|
||||
xparam->want_addr ? &xparam->outputs.addr : NULL,
|
||||
xparam->want_addr ? &xparam->outputs.addrlen : NULL,
|
||||
@@ -2240,7 +2239,7 @@ static inline int php_openssl_tcp_sockop_accept(php_stream *stream, php_openssl_
|
||||
&xparam->outputs.error_code,
|
||||
nodelay);
|
||||
|
||||
if (clisock >= 0) {
|
||||
if (clisock != SOCK_ERR) {
|
||||
php_openssl_netstream_data_t *clisockdata = (php_openssl_netstream_data_t*) emalloc(sizeof(*clisockdata));
|
||||
|
||||
/* copy underlying tcp fields */
|
||||
|
||||
@@ -878,7 +878,7 @@ static inline int php_tcp_sockop_accept(php_stream *stream, php_netstream_data_t
|
||||
&xparam->outputs.error_code,
|
||||
nodelay);
|
||||
|
||||
if (clisock >= 0) {
|
||||
if (clisock != SOCK_ERR) {
|
||||
php_netstream_data_t *clisockdata = (php_netstream_data_t*) emalloc(sizeof(*clisockdata));
|
||||
|
||||
memcpy(clisockdata, sock, sizeof(*clisockdata));
|
||||
|
||||
Reference in New Issue
Block a user