tony2001                Mon May 29 10:59:15 2006 UTC

  Modified files:              
    /php-src/ext/oci8   oci8.c 
  Log:
  fix #37531 (oci8 persistent connection corruption)
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/oci8.c?r1=1.299&r2=1.300&diff_format=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.299 php-src/ext/oci8/oci8.c:1.300
--- php-src/ext/oci8/oci8.c:1.299       Thu May 18 13:20:00 2006
+++ php-src/ext/oci8/oci8.c     Mon May 29 10:59:15 2006
@@ -26,7 +26,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: oci8.c,v 1.299 2006/05/18 13:20:00 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.300 2006/05/29 10:59:15 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.299 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.300 $");
 
        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

Reply via email to