cvs: php4(PHP_4_0_5) /ext/pgsql pgsql.c
| From: | Romolo Manfredini | Date: | Fri, 30 Mar 2001 07:36:22 +0000 |
| Subject: | cvs: php4(PHP_4_0_5) /ext/pgsql pgsql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-4910@lists.php.net to get a copy of this message | ||
romolo Thu Mar 29 23:36:22 2001 EDT
Modified files: (Branch: PHP_4_0_5)
/php4/ext/pgsql pgsql.c
Log:
pg_close was not closing the connection, making impossible to reopen it. Pls insert in 4.0.5
Index: php4/ext/pgsql/pgsql.c
diff -u php4/ext/pgsql/pgsql.c:1.93.2.1 php4/ext/pgsql/pgsql.c:1.93.2.2
--- php4/ext/pgsql/pgsql.c:1.93.2.1 Tue Mar 27 02:22:32 2001
+++ php4/ext/pgsql/pgsql.c Thu Mar 29 23:36:21 2001
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.93.2.1 2001/03/27 10:22:32 romolo Exp $ */
+/* $Id: pgsql.c,v 1.93.2.2 2001/03/30 07:36:21 romolo Exp $ */
#include <stdlib.h>
@@ -501,8 +501,7 @@
PHP_FUNCTION(pg_close)
{
zval **pgsql_link = NULL;
- void *ptr;
- int id, type;
+ int id;
PGconn *pgsql;
PGLS_FETCH();
@@ -528,15 +527,13 @@
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
|| (pgsql_link && Z_RESVAL_PP(pgsql_link)==PGG(default_link))) {
- zend_list_delete(PGG(default_link));
+ if (id!=-1) {
+ zend_list_delete(PGG(default_link));
+ }
PGG(default_link) = -1;
}