tony2001 Mon May 29 10:59:30 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/oci8 oci8.c
Log:
MFH: fix #37531 (oci8 persistent connection corruption)
http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/oci8.c?r1=1.269.2.16.2.2&r2=1.269.2.16.2.3&diff_format=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.269.2.16.2.2
php-src/ext/oci8/oci8.c:1.269.2.16.2.3
--- php-src/ext/oci8/oci8.c:1.269.2.16.2.2 Thu May 18 13:21:07 2006
+++ php-src/ext/oci8/oci8.c Mon May 29 10:59:30 2006
@@ -26,7 +26,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8.c,v 1.269.2.16.2.2 2006/05/18 13:21:07 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.269.2.16.2.3 2006/05/29 10:59:30 tony2001 Exp $ */
/* TODO
*
* file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty()
with OCI_ATTR_LOBEMPTY
@@ -647,7 +647,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "OCI8 Support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.269.2.16.2.2 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.269.2.16.2.3 $");
sprintf(buf, "%ld", OCI_G(num_persistent));
php_info_print_table_row(2, "Active Persistent Connections", buf);
@@ -1055,10 +1055,14 @@
/* server died */
}
else {
+ int rsrc_type;
+
/* okay, the connection
is open and the server is still alive */
connection->used_this_request = 1;
smart_str_free_ex(&hashed_details, 0);
- if
(zend_list_addref(connection->rsrc_id) == FAILURE) {
+ if
(zend_list_find(connection->rsrc_id, &rsrc_type) && (rsrc_type ==
le_pconnection) && zend_list_addref(connection->rsrc_id) == SUCCESS) {
+ /* do nothing */
+ } else {
connection->rsrc_id = zend_list_insert(connection, le_pconnection);
}
return connection;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php