--- embedaddon/php/main/streams/xp_socket.c 2012/02/21 23:48:05 1.1.1.1 +++ embedaddon/php/main/streams/xp_socket.c 2013/07/22 01:32:11 1.1.1.3 @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xp_socket.c,v 1.1.1.1 2012/02/21 23:48:05 misho Exp $ */ +/* $Id: xp_socket.c,v 1.1.1.3 2013/07/22 01:32:11 misho Exp $ */ #include "php.h" #include "ext/standard/file.h" @@ -194,7 +194,7 @@ static int php_sockop_close(php_stream *stream, int cl * Essentially, we are waiting for the socket to become writeable, which means * that all pending data has been sent. * We use a small timeout which should encourage the OS to send the data, - * but at the same time avoid hanging indefintely. + * but at the same time avoid hanging indefinitely. * */ do { n = php_pollfd_for_ms(sock->socket, POLLOUT, 500); @@ -400,10 +400,6 @@ static int php_sockop_set_option(php_stream *stream, i } #endif - case PHP_STREAM_OPTION_WRITE_BUFFER: - php_stream_set_chunk_size(stream, (ptrparam ? *(size_t *)ptrparam : PHP_SOCK_CHUNK_SIZE)); - return PHP_STREAM_OPTION_RETURN_OK; - default: return PHP_STREAM_OPTION_RETURN_NOTIMPL; } @@ -514,6 +510,9 @@ static inline int parse_unix_address(php_stream_xport_ * BUT, to get into this branch of code, the name is too long, * so we don't care. */ xparam->inputs.namelen = sizeof(unix_addr->sun_path) - 1; + php_error_docref(NULL TSRMLS_CC, E_NOTICE, + "socket path exceeded the maximum allowed length of %lu bytes " + "and was truncated", (unsigned long)sizeof(unix_addr->sun_path)); } memcpy(unix_addr->sun_path, xparam->inputs.name, xparam->inputs.namelen);