[PHP-CVS] cvs: php-src /ext/standard fsock.c
pollita Sun Sep 24 21:43:42 2006 UTC Modified files: /php-src/ext/standard fsock.c Log: PHP6 Update: fsockopen/psfockopen http://cvs.php.net/viewvc.cgi/php-src/ext/standard/fsock.c?r1=1.123r2=1.124diff_format=u Index: php-src/ext/standard/fsock.c diff -u php-src/ext/standard/fsock.c:1.123 php-src/ext/standard/fsock.c:1.124 --- php-src/ext/standard/fsock.c:1.123 Sun Feb 19 04:29:41 2006 +++ php-src/ext/standard/fsock.cSun Sep 24 21:43:41 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: fsock.c,v 1.123 2006/02/19 04:29:41 andi Exp $ */ +/* $Id: fsock.c,v 1.124 2006/09/24 21:43:41 pollita Exp $ */ #include php.h #include php_globals.h @@ -98,7 +98,7 @@ if (zerrstr errstr) { /* no need to dup; we need to efree buf anyway */ zval_dtor(zerrstr); - ZVAL_STRING(zerrstr, errstr, 0); + ZVAL_RT_STRING(zerrstr, errstr, ZSTR_AUTOFREE); } else if (!zerrstr errstr) { efree(errstr); @@ -116,14 +116,14 @@ /* }}} */ -/* {{{ proto resource fsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]]) +/* {{{ proto resource fsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]]) U Open Internet or Unix domain socket connection */ PHP_FUNCTION(fsockopen) { php_fsockopen_stream(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } /* }}} */ -/* {{{ proto resource pfsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]]) +/* {{{ proto resource pfsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]]) U Open persistent Internet or Unix domain socket connection */ PHP_FUNCTION(pfsockopen) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard fsock.c
andrey Wed Dec 31 05:56:33 2003 EDT Modified files: /php-src/ext/standard fsock.c Log: proto fix Index: php-src/ext/standard/fsock.c diff -u php-src/ext/standard/fsock.c:1.117 php-src/ext/standard/fsock.c:1.118 --- php-src/ext/standard/fsock.c:1.117 Wed Nov 12 17:01:02 2003 +++ php-src/ext/standard/fsock.cWed Dec 31 05:56:32 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: fsock.c,v 1.117 2003/11/12 22:01:02 jay Exp $ */ +/* $Id: fsock.c,v 1.118 2003/12/31 10:56:32 andrey Exp $ */ #include php.h #include php_globals.h @@ -116,14 +116,14 @@ /* }}} */ -/* {{{ proto int fsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]]) +/* {{{ proto resource fsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]]) Open Internet or Unix domain socket connection */ PHP_FUNCTION(fsockopen) { php_fsockopen_stream(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } /* }}} */ -/* {{{ proto int pfsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]]) +/* {{{ proto resource pfsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]]) Open persistent Internet or Unix domain socket connection */ PHP_FUNCTION(pfsockopen) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard fsock.c
jay Wed Nov 12 17:01:03 2003 EDT Modified files: /php-src/ext/standard fsock.c Log: Plugged a small memleak when errstr isn't efree()'d. Index: php-src/ext/standard/fsock.c diff -u php-src/ext/standard/fsock.c:1.116 php-src/ext/standard/fsock.c:1.117 --- php-src/ext/standard/fsock.c:1.116 Thu Aug 28 12:49:57 2003 +++ php-src/ext/standard/fsock.cWed Nov 12 17:01:02 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: fsock.c,v 1.116 2003/08/28 16:49:57 sas Exp $ */ +/* $Id: fsock.c,v 1.117 2003/11/12 22:01:02 jay Exp $ */ #include php.h #include php_globals.h @@ -100,6 +100,10 @@ zval_dtor(zerrstr); ZVAL_STRING(zerrstr, errstr, 0); } + else if (!zerrstr errstr) { + efree(errstr); + } + RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard fsock.c
sas Thu Aug 28 11:16:21 2003 EDT Modified files: /php-src/ext/standard fsock.c Log: fix format string (long port) Index: php-src/ext/standard/fsock.c diff -u php-src/ext/standard/fsock.c:1.113 php-src/ext/standard/fsock.c:1.114 --- php-src/ext/standard/fsock.c:1.113 Tue Jun 10 16:03:37 2003 +++ php-src/ext/standard/fsock.cThu Aug 28 11:16:20 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: fsock.c,v 1.113 2003/06/10 20:03:37 imajes Exp $ */ +/* $Id: fsock.c,v 1.114 2003/08/28 15:16:20 sas Exp $ */ #include php.h #include php_globals.h @@ -52,7 +52,7 @@ } if (persistent) { - spprintf(hashkey, 0, pfsockopen__%s:%d, host, port); + spprintf(hashkey, 0, pfsockopen__%s:%ld, host, port); } if (port 0) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php