cvs: php4(PHP_4_0_5) /ext/pgsql pgsql.c
| From: | Zeev Suraski | Date: | Fri, 30 Mar 2001 15:04:19 +0000 |
| Subject: | cvs: php4(PHP_4_0_5) /ext/pgsql pgsql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-4922@lists.php.net to get a copy of this message | ||
zeev Fri Mar 30 07:04:19 2001 EDT
Modified files: (Branch: PHP_4_0_5)
/php4/ext/pgsql pgsql.c
Log:
Fix pgsql_set_Default_link()
Index: php4/ext/pgsql/pgsql.c
diff -u php4/ext/pgsql/pgsql.c:1.93.2.3 php4/ext/pgsql/pgsql.c:1.93.2.4
--- php4/ext/pgsql/pgsql.c:1.93.2.3 Fri Mar 30 06:57:02 2001
+++ php4/ext/pgsql/pgsql.c Fri Mar 30 07:04:18 2001
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.93.2.3 2001/03/30 14:57:02 zeev Exp $ */
+/* $Id: pgsql.c,v 1.93.2.4 2001/03/30 15:04:18 zeev Exp $ */
#include <stdlib.h>
@@ -117,14 +117,14 @@
{
PGLS_FETCH();
+ zend_list_addref(id); /* increase refcount for the new default link */
+
if (PGG(default_link) != -1) {
+ /* decrease refcount for the old default link */
zend_list_delete(PGG(default_link));
}
- if (PGG(default_link) != id) {
- PGG(default_link) = id;
- zend_list_addref(id);
- }
+ PGG(default_link) = id;
}