cvs: php4(PHP_4_0_5) /ext/pgsql pgsql.c

From: Date: Tue, 27 Mar 2001 10:22:32 +0000
Subject: cvs: php4(PHP_4_0_5) /ext/pgsql pgsql.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-4854@lists.php.net to get a copy of this message
romolo Tue Mar 27 02:22:32 2001 EDT Modified files: (Branch: PHP_4_0_5) /php4/ext/pgsql pgsql.c Log: pg_close was closing connection twice, pls insert in 4_0_5 Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.93 php4/ext/pgsql/pgsql.c:1.93.2.1 --- php4/ext/pgsql/pgsql.c:1.93 Sun Feb 25 22:07:12 2001 +++ php4/ext/pgsql/pgsql.c Tue Mar 27 02:22:32 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.93 2001/02/26 06:07:12 andi Exp $ */ +/* $Id: pgsql.c,v 1.93.2.1 2001/03/27 10:22:32 romolo Exp $ */ #include <stdlib.h> @@ -501,7 +501,8 @@ PHP_FUNCTION(pg_close) { zval **pgsql_link = NULL; - int id; + void *ptr; + int id, type; PGconn *pgsql; PGLS_FETCH(); @@ -527,6 +528,10 @@ if (id==-1) { /* explicit resource number */ zend_list_delete(Z_RESVAL_PP(pgsql_link)); + ptr = zend_list_find(Z_RESVAL_PP(pgsql_link),&type); + if (ptr && (type==le_link || type==le_plink)) { + RETURN_TRUE; + } } if (id!=-1

« previous php.cvs (#4854) next »