diff options
Diffstat (limited to 'ext/sockets')
-rw-r--r-- | ext/sockets/multicast.c | 10 | ||||
-rw-r--r-- | ext/sockets/sendrecvmsg.c | 2 | ||||
-rw-r--r-- | ext/sockets/sockets.c | 34 | ||||
-rw-r--r-- | ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt | 4 | ||||
-rw-r--r-- | ext/sockets/tests/socket_create_pair-wrongparams.phpt | 10 | ||||
-rw-r--r-- | ext/sockets/tests/socket_import_stream-2.phpt | 2 | ||||
-rw-r--r-- | ext/sockets/tests/socket_select-wrongparams-1.phpt | 2 | ||||
-rw-r--r-- | ext/sockets/tests/socket_select-wrongparams-2.phpt | 2 | ||||
-rw-r--r-- | ext/sockets/tests/socket_set_option_rcvtimeo.phpt | 2 | ||||
-rw-r--r-- | ext/sockets/tests/socket_set_option_seolinger.phpt | 4 | ||||
-rw-r--r-- | ext/sockets/tests/socket_set_option_sndtimeo.phpt | 2 |
11 files changed, 37 insertions, 37 deletions
diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c index 4ed32d2518..9c2ede219d 100644 --- a/ext/sockets/multicast.c +++ b/ext/sockets/multicast.c @@ -67,7 +67,7 @@ int php_string_to_if_index(const char *val, unsigned *out) ind = if_nametoindex(val); if (ind == 0) { php_error_docref(NULL, E_WARNING, - "no interface with name \"%s\" could be found", val); + "No interface with name \"%s\" could be found", val); return FAILURE; } else { *out = ind; @@ -75,7 +75,7 @@ int php_string_to_if_index(const char *val, unsigned *out) } #else php_error_docref(NULL, E_WARNING, - "this platform does not support looking up an interface by " + "This platform does not support looking up an interface by " "name, an integer interface index must be supplied instead"); return FAILURE; #endif @@ -88,7 +88,7 @@ static int php_get_if_index_from_zval(zval *val, unsigned *out) if (Z_TYPE_P(val) == IS_LONG) { if (Z_LVAL_P(val) < 0 || (zend_ulong)Z_LVAL_P(val) > UINT_MAX) { php_error_docref(NULL, E_WARNING, - "the interface index cannot be negative or larger than %u;" + "The interface index cannot be negative or larger than %u;" " given " ZEND_LONG_FMT, UINT_MAX, Z_LVAL_P(val)); ret = FAILURE; } else { @@ -127,7 +127,7 @@ static int php_get_address_from_array(const HashTable *ht, const char *key, zend_string *str, *tmp_str; if ((val = zend_hash_str_find(ht, key, strlen(key))) == NULL) { - php_error_docref(NULL, E_WARNING, "no key \"%s\" passed in optval", key); + php_error_docref(NULL, E_WARNING, "No key \"%s\" passed in optval", key); return FAILURE; } str = zval_get_tmp_string(val, &tmp_str); @@ -221,7 +221,7 @@ mcast_req_fun: #endif default: php_error_docref(NULL, E_WARNING, - "unexpected option in php_do_mcast_opt (level %d, option %d). " + "Unexpected option in php_do_mcast_opt (level %d, option %d). " "This is a bug.", level, optname); return FAILURE; } diff --git a/ext/sockets/sendrecvmsg.c b/ext/sockets/sendrecvmsg.c index e3c302f5c4..7786f70721 100644 --- a/ext/sockets/sendrecvmsg.c +++ b/ext/sockets/sendrecvmsg.c @@ -265,7 +265,7 @@ PHP_FUNCTION(socket_recvmsg) } } else { SOCKETS_G(last_error) = errno; - php_error_docref(NULL, E_WARNING, "error in recvmsg [%d]: %s", + php_error_docref(NULL, E_WARNING, "Error in recvmsg [%d]: %s", errno, sockets_strerror(errno)); RETURN_FALSE; } diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 322355c3c1..ea76fa9100 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -789,7 +789,7 @@ PHP_FUNCTION(socket_select) } if (!sets) { - php_error_docref(NULL, E_WARNING, "no resource arrays were passed to select"); + php_error_docref(NULL, E_WARNING, "No resource arrays were passed to select"); RETURN_FALSE; } @@ -813,7 +813,7 @@ PHP_FUNCTION(socket_select) if (retval == -1) { SOCKETS_G(last_error) = errno; - php_error_docref(NULL, E_WARNING, "unable to select [%d]: %s", errno, sockets_strerror(errno)); + php_error_docref(NULL, E_WARNING, "Unable to select [%d]: %s", errno, sockets_strerror(errno)); RETURN_FALSE; } @@ -1275,12 +1275,12 @@ PHP_FUNCTION(socket_create) && arg1 != AF_INET6 #endif && arg1 != AF_INET) { - php_error_docref(NULL, E_WARNING, "invalid socket domain [" ZEND_LONG_FMT "] specified for argument 1, assuming AF_INET", arg1); + php_error_docref(NULL, E_WARNING, "Invalid socket domain [" ZEND_LONG_FMT "] specified for argument 1, assuming AF_INET", arg1); arg1 = AF_INET; } if (arg2 > 10) { - php_error_docref(NULL, E_WARNING, "invalid socket type [" ZEND_LONG_FMT "] specified for argument 2, assuming SOCK_STREAM", arg2); + php_error_docref(NULL, E_WARNING, "Invalid socket type [" ZEND_LONG_FMT "] specified for argument 2, assuming SOCK_STREAM", arg2); arg2 = SOCK_STREAM; } @@ -1478,7 +1478,7 @@ PHP_FUNCTION(socket_bind) } #endif default: - php_error_docref(NULL, E_WARNING, "unsupported socket type '%d', must be AF_UNIX, AF_INET, or AF_INET6", php_sock->type); + php_error_docref(NULL, E_WARNING, "Unsupported socket type '%d', must be AF_UNIX, AF_INET, or AF_INET6", php_sock->type); RETURN_FALSE; } @@ -1942,11 +1942,11 @@ PHP_FUNCTION(socket_set_option) opt_ht = Z_ARRVAL_P(arg4); if ((l_onoff = zend_hash_str_find(opt_ht, l_onoff_key, sizeof(l_onoff_key) - 1)) == NULL) { - php_error_docref(NULL, E_WARNING, "no key \"%s\" passed in optval", l_onoff_key); + php_error_docref(NULL, E_WARNING, "No key \"%s\" passed in optval", l_onoff_key); RETURN_FALSE; } if ((l_linger = zend_hash_str_find(opt_ht, l_linger_key, sizeof(l_linger_key) - 1)) == NULL) { - php_error_docref(NULL, E_WARNING, "no key \"%s\" passed in optval", l_linger_key); + php_error_docref(NULL, E_WARNING, "No key \"%s\" passed in optval", l_linger_key); RETURN_FALSE; } @@ -1970,11 +1970,11 @@ PHP_FUNCTION(socket_set_option) opt_ht = Z_ARRVAL_P(arg4); if ((sec = zend_hash_str_find(opt_ht, sec_key, sizeof(sec_key) - 1)) == NULL) { - php_error_docref(NULL, E_WARNING, "no key \"%s\" passed in optval", sec_key); + php_error_docref(NULL, E_WARNING, "No key \"%s\" passed in optval", sec_key); RETURN_FALSE; } if ((usec = zend_hash_str_find(opt_ht, usec_key, sizeof(usec_key) - 1)) == NULL) { - php_error_docref(NULL, E_WARNING, "no key \"%s\" passed in optval", usec_key); + php_error_docref(NULL, E_WARNING, "No key \"%s\" passed in optval", usec_key); RETURN_FALSE; } @@ -2047,18 +2047,18 @@ PHP_FUNCTION(socket_create_pair) && domain != AF_INET6 #endif && domain != AF_UNIX) { - php_error_docref(NULL, E_WARNING, "invalid socket domain [" ZEND_LONG_FMT "] specified for argument 1, assuming AF_INET", domain); + php_error_docref(NULL, E_WARNING, "Invalid socket domain [" ZEND_LONG_FMT "] specified for argument 1, assuming AF_INET", domain); domain = AF_INET; } if (type > 10) { - php_error_docref(NULL, E_WARNING, "invalid socket type [" ZEND_LONG_FMT "] specified for argument 2, assuming SOCK_STREAM", type); + php_error_docref(NULL, E_WARNING, "Invalid socket type [" ZEND_LONG_FMT "] specified for argument 2, assuming SOCK_STREAM", type); type = SOCK_STREAM; } if (socketpair(domain, type, protocol, fds_array) != 0) { SOCKETS_G(last_error) = errno; - php_error_docref(NULL, E_WARNING, "unable to create socket pair [%d]: %s", errno, sockets_strerror(errno)); + php_error_docref(NULL, E_WARNING, "Unable to create socket pair [%d]: %s", errno, sockets_strerror(errno)); efree(php_sock[0]); efree(php_sock[1]); RETURN_FALSE; @@ -2337,7 +2337,7 @@ PHP_FUNCTION(socket_export_stream) stream = php_stream_sock_open_from_socket(socket->bsd_socket, 0); if (stream == NULL) { - php_error_docref(NULL, E_WARNING, "failed to create stream"); + php_error_docref(NULL, E_WARNING, "Failed to create stream"); RETURN_FALSE; } } @@ -2464,14 +2464,14 @@ PHP_FUNCTION(socket_addrinfo_bind) break; } default: - php_error_docref(NULL, E_WARNING, "unsupported socket type '%d', must be AF_UNIX, AF_INET, or AF_INET6", php_sock->type); + php_error_docref(NULL, E_WARNING, "Unsupported socket type '%d', must be AF_UNIX, AF_INET, or AF_INET6", php_sock->type); close(php_sock->bsd_socket); efree(php_sock); RETURN_FALSE; } if (retval != 0) { - PHP_SOCKET_ERROR(php_sock, "unable to bind address", errno); + PHP_SOCKET_ERROR(php_sock, "Unable to bind address", errno); close(php_sock->bsd_socket); efree(php_sock); RETURN_FALSE; @@ -2530,14 +2530,14 @@ PHP_FUNCTION(socket_addrinfo_connect) break; } default: - php_error_docref(NULL, E_WARNING, "unsupported socket type '%d', must be AF_UNIX, AF_INET, or AF_INET6", php_sock->type); + php_error_docref(NULL, E_WARNING, "Unsupported socket type '%d', must be AF_UNIX, AF_INET, or AF_INET6", php_sock->type); close(php_sock->bsd_socket); efree(php_sock); RETURN_FALSE; } if (retval != 0) { - PHP_SOCKET_ERROR(php_sock, "unable to connect address", errno); + PHP_SOCKET_ERROR(php_sock, "Unable to connect address", errno); close(php_sock->bsd_socket); efree(php_sock); RETURN_FALSE; diff --git a/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt index 5cf054458a..9216a87046 100644 --- a/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt +++ b/ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt @@ -19,10 +19,10 @@ var_dump(socket_create_pair(AF_INET, 31337, 0, $sockets)); --EXPECTF-- bool(true) -Warning: socket_create_pair(): invalid socket domain [31337] specified for argument 1, assuming AF_INET in %s on line %d +Warning: socket_create_pair(): Invalid socket domain [31337] specified for argument 1, assuming AF_INET in %s on line %d bool(true) -Warning: socket_create_pair(): invalid socket type [31337] specified for argument 2, assuming SOCK_STREAM in %s on line %d +Warning: socket_create_pair(): Invalid socket type [31337] specified for argument 2, assuming SOCK_STREAM in %s on line %d bool(true) --CREDITS-- Till Klampaeckel, till@php.net diff --git a/ext/sockets/tests/socket_create_pair-wrongparams.phpt b/ext/sockets/tests/socket_create_pair-wrongparams.phpt index 41154620ad..a7bc17b86b 100644 --- a/ext/sockets/tests/socket_create_pair-wrongparams.phpt +++ b/ext/sockets/tests/socket_create_pair-wrongparams.phpt @@ -19,17 +19,17 @@ var_dump(socket_create_pair(AF_INET, 31337, 0, $sockets)); ?> --EXPECTF-- -Warning: socket_create_pair(): unable to create socket pair [%d]: %s not supported in %s on line %d +Warning: socket_create_pair(): Unable to create socket pair [%d]: %s not supported in %s on line %d bool(false) -Warning: socket_create_pair(): invalid socket domain [31337] specified for argument 1, assuming AF_INET in %s on line %d +Warning: socket_create_pair(): Invalid socket domain [31337] specified for argument 1, assuming AF_INET in %s on line %d -Warning: socket_create_pair(): unable to create socket pair [%d]: %s not supported in %s on line %d +Warning: socket_create_pair(): Unable to create socket pair [%d]: %s not supported in %s on line %d bool(false) -Warning: socket_create_pair(): invalid socket type [31337] specified for argument 2, assuming SOCK_STREAM in %s on line %d +Warning: socket_create_pair(): Invalid socket type [31337] specified for argument 2, assuming SOCK_STREAM in %s on line %d -Warning: socket_create_pair(): unable to create socket pair [%d]: %s not supported %s on line %d +Warning: socket_create_pair(): Unable to create socket pair [%d]: %s not supported %s on line %d bool(false) --CREDITS-- Till Klampaeckel, till@php.net diff --git a/ext/sockets/tests/socket_import_stream-2.phpt b/ext/sockets/tests/socket_import_stream-2.phpt index dfa291c283..16c25f2307 100644 --- a/ext/sockets/tests/socket_import_stream-2.phpt +++ b/ext/sockets/tests/socket_import_stream-2.phpt @@ -26,7 +26,7 @@ try { echo "Done."; ?> --EXPECTF-- -Warning: socket_import_stream(): cannot represent a stream of type STDIO as a Socket Descriptor in %s on line %d +Warning: socket_import_stream(): Cannot represent a stream of type STDIO as a Socket Descriptor in %s on line %d bool(false) socket_import_stream(): supplied resource is not a valid stream resource resource(%d) of type (stream) diff --git a/ext/sockets/tests/socket_select-wrongparams-1.phpt b/ext/sockets/tests/socket_select-wrongparams-1.phpt index 848088fe45..2658063e36 100644 --- a/ext/sockets/tests/socket_select-wrongparams-1.phpt +++ b/ext/sockets/tests/socket_select-wrongparams-1.phpt @@ -19,7 +19,7 @@ $except = null; $time = -1; var_dump(socket_select($sockets, $write, $except, $time)); --EXPECTF-- -Warning: socket_select(): unable to select [%d]: Invalid argument in %s on line %d +Warning: socket_select(): Unable to select [%d]: Invalid argument in %s on line %d bool(false) --CREDITS-- Till Klampaeckel, till@php.net diff --git a/ext/sockets/tests/socket_select-wrongparams-2.phpt b/ext/sockets/tests/socket_select-wrongparams-2.phpt index a7c423df1b..d45bc4c44a 100644 --- a/ext/sockets/tests/socket_select-wrongparams-2.phpt +++ b/ext/sockets/tests/socket_select-wrongparams-2.phpt @@ -13,7 +13,7 @@ $except = null; $time = 0; var_dump(socket_select($sockets, $write, $except, $time)); --EXPECTF-- -Warning: socket_select(): no resource arrays were passed to select in %s on line %d +Warning: socket_select(): No resource arrays were passed to select in %s on line %d bool(false) --CREDITS-- Till Klampaeckel, till@php.net diff --git a/ext/sockets/tests/socket_set_option_rcvtimeo.phpt b/ext/sockets/tests/socket_set_option_rcvtimeo.phpt index a27d4075db..07238aa9e4 100644 --- a/ext/sockets/tests/socket_set_option_rcvtimeo.phpt +++ b/ext/sockets/tests/socket_set_option_rcvtimeo.phpt @@ -30,7 +30,7 @@ var_dump($retval_3 === $options); socket_close($socket); ?> --EXPECTF-- -Warning: socket_set_option(): no key "sec" passed in optval in %s on line %d +Warning: socket_set_option(): No key "sec" passed in optval in %s on line %d bool(true) bool(true) --CREDITS-- diff --git a/ext/sockets/tests/socket_set_option_seolinger.phpt b/ext/sockets/tests/socket_set_option_seolinger.phpt index 4d171fc70a..d284a37f63 100644 --- a/ext/sockets/tests/socket_set_option_seolinger.phpt +++ b/ext/sockets/tests/socket_set_option_seolinger.phpt @@ -37,9 +37,9 @@ var_dump((bool)$retval_3["l_onoff"] === (bool)$options["l_onoff"]); socket_close($socket); ?> --EXPECTF-- -Warning: socket_set_option(): no key "l_onoff" passed in optval in %s on line %d +Warning: socket_set_option(): No key "l_onoff" passed in optval in %s on line %d -Warning: socket_set_option(): no key "l_linger" passed in optval in %s on line %d +Warning: socket_set_option(): No key "l_linger" passed in optval in %s on line %d bool(false) bool(true) bool(true) diff --git a/ext/sockets/tests/socket_set_option_sndtimeo.phpt b/ext/sockets/tests/socket_set_option_sndtimeo.phpt index 1b4fb5570d..9c79fd8270 100644 --- a/ext/sockets/tests/socket_set_option_sndtimeo.phpt +++ b/ext/sockets/tests/socket_set_option_sndtimeo.phpt @@ -30,7 +30,7 @@ var_dump($retval_3 === $options); socket_close($socket); ?> --EXPECTF-- -Warning: socket_set_option(): no key "sec" passed in optval in %s on line %d +Warning: socket_set_option(): No key "sec" passed in optval in %s on line %d bool(true) bool(true) --CREDITS-- |