Skip to content

Commit 419bbff

Browse files
committed
Make it really build...
1 parent 7263c22 commit 419bbff

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ext/standard/streamsfuncs.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static php_stream_context *decode_context_param(zval *contextresource TSRMLS_DC)
4343

4444
#if HAVE_SOCKETPAIR
4545
/* {{{ proto array stream_socket_pair(int domain, int type, int protocol)
46-
Creates a pair of indistinguishable socket streams */
46+
Creates a pair of connected, indistinguishable socket streams */
4747
PHP_FUNCTION(stream_socket_pair)
4848
{
4949
long domain, type, protocol;
@@ -57,8 +57,9 @@ PHP_FUNCTION(stream_socket_pair)
5757
}
5858

5959
if (0 != socketpair(domain, type, protocol, pair)) {
60+
char errbuf[256];
6061
php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed to create sockets: [%d]: %s",
61-
php_socket_errno(), php_socket_strerror(php_socket_errno()));
62+
php_socket_errno(), php_socket_strerror(php_socket_errno(), errbuf, sizeof(errbuf)));
6263
RETURN_FALSE;
6364
}
6465

@@ -67,8 +68,8 @@ PHP_FUNCTION(stream_socket_pair)
6768
s1 = php_stream_sock_open_from_socket(pair[0], 0);
6869
s2 = php_stream_sock_open_from_socket(pair[1], 0);
6970

70-
add_next_index_zval(return_value, php_stream_get_resource_id(s1));
71-
add_next_index_zval(return_value, php_stream_get_resource_id(s2));
71+
add_next_index_resource(return_value, php_stream_get_resource_id(s1));
72+
add_next_index_resource(return_value, php_stream_get_resource_id(s2));
7273
}
7374
/* }}} */
7475
#endif

0 commit comments

Comments
 (0)