summaryrefslogtreecommitdiffstats
path: root/php-7.0.0-odbctimer.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-09-02 10:37:14 +0200
committerRemi Collet <remi@php.net>2022-09-02 10:37:14 +0200
commitc275578ce46d661552e642c8f21dd68eabd427db (patch)
tree0bcd72776f7a8b86895d5f8a8194237b707a9d53 /php-7.0.0-odbctimer.patch
parentb8a8e0dcae66482c106ba134f3f2a9fc2bc0b163 (diff)
update to 8.2.0RC1
bump API/ABI new random extension add dependency on libselinux
Diffstat (limited to 'php-7.0.0-odbctimer.patch')
-rw-r--r--php-7.0.0-odbctimer.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/php-7.0.0-odbctimer.patch b/php-7.0.0-odbctimer.patch
new file mode 100644
index 0000000..18bcf0f
--- /dev/null
+++ b/php-7.0.0-odbctimer.patch
@@ -0,0 +1,45 @@
+diff -up php-7.0.0RC1/ext/odbc/php_odbc.c.odbctimer php-7.0.0RC1/ext/odbc/php_odbc.c
+--- php-7.0.0RC1/ext/odbc/php_odbc.c.odbctimer 2015-08-18 23:39:26.000000000 +0200
++++ php-7.0.0RC1/ext/odbc/php_odbc.c 2015-08-22 07:44:51.170196466 +0200
+@@ -434,7 +434,8 @@ static void _free_odbc_result(zend_resou
+ efree(res->values);
+ res->values = NULL;
+ }
+- if (res->stmt) {
++ /* If aborted via timer expiration, don't try to call any unixODBC function */
++ if (res->stmt && !(PG(connection_status) & PHP_CONNECTION_TIMEOUT)) {
+ #if defined(HAVE_SOLID) || defined(HAVE_SOLID_30) || defined(HAVE_SOLID_35)
+ SQLTransact(res->conn_ptr->henv, res->conn_ptr->hdbc,
+ (SQLUSMALLINT) SQL_COMMIT);
+@@ -484,9 +485,12 @@ static void _close_odbc_conn(zend_resour
+ }
+ } ZEND_HASH_FOREACH_END();
+
+- safe_odbc_disconnect(conn->hdbc);
+- SQLFreeConnect(conn->hdbc);
+- SQLFreeEnv(conn->henv);
++ /* If aborted via timer expiration, don't try to call any unixODBC function */
++ if (!(PG(connection_status) & PHP_CONNECTION_TIMEOUT)) {
++ safe_odbc_disconnect(conn->hdbc);
++ SQLFreeConnect(conn->hdbc);
++ SQLFreeEnv(conn->henv);
++ }
+ efree(conn);
+ ODBCG(num_links)--;
+ }
+@@ -509,9 +513,12 @@ static void _close_odbc_pconn(zend_resou
+ }
+ } ZEND_HASH_FOREACH_END();
+
+- safe_odbc_disconnect(conn->hdbc);
+- SQLFreeConnect(conn->hdbc);
+- SQLFreeEnv(conn->henv);
++ /* If aborted via timer expiration, don't try to call any unixODBC function */
++ if (!(PG(connection_status) & PHP_CONNECTION_TIMEOUT)) {
++ safe_odbc_disconnect(conn->hdbc);
++ SQLFreeConnect(conn->hdbc);
++ SQLFreeEnv(conn->henv);
++ }
+ free(conn);
+
+ ODBCG(num_links)--;