cvs: php4 /ext/sockets sockets.c
| From: | Markus Fischer | Date: | Wed, 01 May 2002 16:38:22 +0000 |
| Subject: | cvs: php4 /ext/sockets sockets.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-11597@lists.php.net to get a copy of this message | ||
mfischer Wed May 1 12:38:22 2002 EDT
Modified files:
/php4/ext/sockets sockets.c
Log:
- Update protos for socket_read() and socket_write().
- Set last_error in socket_write().
Index: php4/ext/sockets/sockets.c
diff -u php4/ext/sockets/sockets.c:1.109 php4/ext/sockets/sockets.c:1.110
--- php4/ext/sockets/sockets.c:1.109 Wed May 1 12:08:50 2002
+++ php4/ext/sockets/sockets.c Wed May 1 12:38:22 2002
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sockets.c,v 1.109 2002/05/01 16:08:50 mfischer Exp $ */
+/* $Id: sockets.c,v 1.110 2002/05/01 16:38:22 mfischer Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -696,7 +696,7 @@
/* }}} */
/* {{{ proto int socket_write(resource socket, string buf[, int length])
- Writes the buffer to the file descriptor fd, length is optional */
+ Writes the buffer to the socket resource, length is optional */
PHP_FUNCTION(socket_write)
{
zval *arg1;
@@ -720,7 +720,7 @@
#endif
if (retval < 0) {
- php_sock->error = errno;
+ SOCKETS_G(last_error) = php_sock->error = errno;
php_error(E_WARNING, "%s() unable to write to socket %d [%d]: %s",
get_active_function_name(TSRMLS_C), php_sock->bsd_socket, errno, php_strerror(errno));
RETURN_FALSE;
}
@@ -732,7 +732,7 @@
typedef int (*read_func)(int, void *, int);
/* {{{ proto string socket_read(resource socket, int length [, int type])
- Reads length bytes from socket */
+ Reads a maximum of length bytes from socket */
PHP_FUNCTION(socket_read)
{
zval *arg1;