iliaa Wed Jul 28 19:34:30 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/standard streamsfuncs.c Log: MFH: Better address availability check. http://cvs.php.net/diff.php/php-src/ext/standard/streamsfuncs.c?r1=1.35.2.1&r2=1.35.2.2&ty=u Index: php-src/ext/standard/streamsfuncs.c diff -u php-src/ext/standard/streamsfuncs.c:1.35.2.1 php-src/ext/standard/streamsfuncs.c:1.35.2.2 --- php-src/ext/standard/streamsfuncs.c:1.35.2.1 Wed Jul 28 19:21:56 2004 +++ php-src/ext/standard/streamsfuncs.c Wed Jul 28 19:34:30 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streamsfuncs.c,v 1.35.2.1 2004/07/28 23:21:56 iliaa Exp $ */ +/* $Id: streamsfuncs.c,v 1.35.2.2 2004/07/28 23:34:30 iliaa Exp $ */ #include "php.h" #include "php_globals.h" @@ -273,7 +273,7 @@ php_stream *stream; zval *zstream; long flags = 0; - char *data, *target_addr = NULL; + char *data, *target_addr; int datalen, target_addr_len = 0; php_sockaddr_storage sa; socklen_t sl = 0; @@ -283,7 +283,7 @@ } php_stream_from_zval(stream, &zstream); - if (target_addr) { + if (target_addr_len) { /* parse the address */ if (FAILURE == php_network_parse_network_address_with_port(target_addr, target_addr_len, (struct sockaddr*)&sa, &sl TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to parse `%s' into a valid network address", target_addr);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php