romolo Thu Apr 5 05:29:24 2001 EDT
Modified files:
/php4/ext/pgsql pgsql.c
Log:
pg_close not closing right connection.
Index: php4/ext/pgsql/pgsql.c
diff -u php4/ext/pgsql/pgsql.c:1.96 php4/ext/pgsql/pgsql.c:1.97
--- php4/ext/pgsql/pgsql.c:1.96 Wed Apr 4 14:40:41 2001
+++ php4/ext/pgsql/pgsql.c Thu Apr 5 05:29:24 2001
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.96 2001/04/04 21:40:41 thies Exp $ */
+/* $Id: pgsql.c,v 1.97 2001/04/05 12:29:24 romolo Exp $ */
#include <stdlib.h>
@@ -117,14 +117,13 @@
{
PGLS_FETCH();
+ zend_list_addref(id);
+
if (PGG(default_link) != -1) {
zend_list_delete(PGG(default_link));
}
- if (PGG(default_link) != id) {
PGG(default_link) = id;
- zend_list_addref(id);
- }
}
@@ -512,8 +511,7 @@
PHP_FUNCTION(pg_close)
{
zval **pgsql_link = NULL;
- void *ptr;
- int id, type;
+ int id;
PGconn *pgsql;
PGLS_FETCH();
@@ -539,10 +537,6 @@
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
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]