Re: cvs: php4 /sapi/apache mod_php4.c
| From: | Yasuo Ohgaki | Date: | Fri, 16 Aug 2002 03:54:55 +0000 |
| Subject: | Re: cvs: php4 /sapi/apache mod_php4.c | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-86884@lists.php.net to get a copy of this message | ||
Zeev Suraski wrote:
zeev Thu Aug 15 19:59:47 2002 EDTDoes this mean we should always use zend_hash_init_ex and unset apply protection? When we suppposed to unset protection? -- Yasuo OhgakiModified files: /php4/sapi/apache mod_php4.c Log:Fix a NASTY multithreading bug with in the Apache module
Index: php4/sapi/apache/mod_php4.c
diff -u php4/sapi/apache/mod_php4.c:1.135 php4/sapi/apache/mod_php4.c:1.136
--- php4/sapi/apache/mod_php4.c:1.135 Wed Aug 14 13:15:49 2002
+++ php4/sapi/apache/mod_php4.c Thu Aug 15 19:59:47 2002
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php4.c,v 1.135 2002/08/14 17:15:49 kalowsky Exp $ */
+/* $Id: mod_php4.c,v 1.136 2002/08/15 23:59:47 zeev Exp $ */
#include "php_apache_http.h"
@@ -649,7 +649,7 @@
HashTable *per_dir_info;
per_dir_info = (HashTable *) malloc(sizeof(HashTable));
- zend_hash_init(per_dir_info, 5, NULL, (void (*)(void *)) destroy_per_dir_entry, 1);
+ zend_hash_init_ex(per_dir_info, 5, NULL, (void (*)(void *)) destroy_per_dir_entry, 1, 0);
register_cleanup(p, (void *) per_dir_info, (void (*)(void *)) php_destroy_per_dir_info, (void (*)(void *)) zend_hash_destroy);
return per_dir_info;