From: Zeev Suraski Date: Thu, 1 Mar 2001 01:06:36 +0000 (+0000) Subject: Fix a TSRM bug (possibly fixing a sporadic crash in the timeout window X-Git-Tag: php-4.0.5RC1~135 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b22a6ef2b1c74ec315ed4d02633c29ef13096e6b;p=php Fix a TSRM bug (possibly fixing a sporadic crash in the timeout window under Windows) - fix from Ben Mansell --- diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index 0edba20248..d92d1e7f07 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -249,7 +249,7 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id) if (!thread_resources) { allocate_new_resource(&tsrm_tls_table[hash_value], thread_id); - return ts_resource(id); + return ts_resource_ex(id, &thread_id); /* thread_resources = tsrm_tls_table[hash_value]; */ } else { do { @@ -260,7 +260,7 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id) thread_resources = thread_resources->next; } else { allocate_new_resource(&thread_resources->next, thread_id); - return ts_resource(id); + return ts_resource_ex(id, &thread_id); /* * thread_resources = thread_resources->next; * break;