com php-src: Fixed bug #72175: NEWS ext/interbase/interbase.c
| From: | Nikita Popov | Date: | Mon, 25 Mar 2019 15:41:21 +0000 |
| Subject: | com php-src: Fixed bug #72175: NEWS ext/interbase/interbase.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-105329@lists.php.net to get a copy of this message | ||
Commit: 85095dfd0956bc09f5157211948c40cfa2859d27
Author: Nikita Popov <nikita.ppv@gmail.com> Mon, 25 Mar 2019 16:41:21 +0100
Parents: b8b880932e95ff1e575a04a6988bc0cf00b89842
Branches: PHP-7.2 PHP-7.3 PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=85095dfd0956bc09f5157211948c40cfa2859d27
Log:
Fixed bug #72175
Make sure we don't close the connection we're trying to reuse...
Bugs:
https://bugs.php.net/72175
Changed paths:
M NEWS
M ext/interbase/interbase.c
Diff:
diff --git a/NEWS b/NEWS
index d2e5043..8165400 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2019, PHP 7.2.18
+- interbase:
+ . Fixed bug #72175 (Impossibility of creating multiple connections to
+ Interbase with php 7.x). (Nikita)
+
- phpdbg:
. Fixed bug #76801 (too many open files). (alekitto)
diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c
index 5cdf25b..6f28b3f 100644
--- a/ext/interbase/interbase.c
+++ b/ext/interbase/interbase.c
@@ -939,13 +939,15 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
/*
xlink = (zend_resource*) le->ptr;
if ((!persistent && xlink->type == le_link) || xlink->type == le_plink) {
- if (IBG(default_link)) {
- zend_list_close(IBG(default_link));
+ if (IBG(default_link) != xlink) {
+ GC_REFCOUNT(xlink)++;
+ if (IBG(default_link)) {
+ zend_list_delete(IBG(default_link));
+ }
+ IBG(default_link) = xlink;
}
- xlink->gc.refcount++;
- xlink->gc.refcount++;
- IBG(default_link) = xlink;
- RETVAL_RES(xlink);
+ GC_REFCOUNT(xlink)++;
+ RETURN_RES(xlink);
} else {
zend_hash_str_del(&EG(regular_list), hash, sizeof(hash)-1);
}