]> granicus.if.org Git - php/commitdiff
just add a remark. zend_hash_apply can & will cause problems here unless
authorThies C. Arntzen <thies@php.net>
Sat, 15 Jan 2000 13:39:19 +0000 (13:39 +0000)
committerThies C. Arntzen <thies@php.net>
Sat, 15 Jan 2000 13:39:19 +0000 (13:39 +0000)
ext/sybase/sybase.c
ext/sybase_ct/php_sybase_ct.c

index d28a329e256df650f124309b06ef7181ac4d3abf..bb400d0a3e2ddba82146c25f52a901d278fe853c 100644 (file)
@@ -160,6 +160,13 @@ static void _free_sybase_result(sybase_result *result)
 static void _close_sybase_link(sybase_link *sybase_ptr)
 {
        sybase_ptr->valid = 0;
+
+    /* 
+         this can cause crashes in the current model.
+      if the resource gets destroyed via destroy_resource_list() resource_list
+      will *not* be in a consistent state. thies@digicol.de
+    */
+
        zend_hash_apply(resource_list,(int (*)(void *))_clean_invalid_results);
        dbclose(sybase_ptr->link);
        dbloginfree(sybase_ptr->login);
index c9d0cbaf01057dc20632ed1f4c462987c16f3b59..fdba2fb5aef38ba536d5c53d6a87c9bafa138079 100644 (file)
@@ -127,6 +127,12 @@ static void _close_sybase_link(sybase_link *sybase_ptr)
        CS_INT con_status;
 
        sybase_ptr->valid = 0;
+
+       /* 
+         this can cause crashes in the current model.
+         if the resource gets destroyed via destroy_resource_list() resource_list 
+         will *not* be in a consistent state. thies@digicol.de
+    */
        zend_hash_apply(resource_list,(int (*)(void *))_clean_invalid_results);
 
        /* Non-persistent connections will always be connected or we wouldn't