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;
}
--
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]