]> granicus.if.org Git - php/commitdiff
Fix a TSRM bug (possibly fixing a sporadic crash in the timeout window
authorZeev Suraski <zeev@php.net>
Thu, 1 Mar 2001 01:06:36 +0000 (01:06 +0000)
committerZeev Suraski <zeev@php.net>
Thu, 1 Mar 2001 01:06:36 +0000 (01:06 +0000)
under Windows) - fix from Ben Mansell

TSRM/TSRM.c

index 0edba202483b63b4eaa825101a65bc90e7a57670..d92d1e7f074ef64682375836a657afea4c26fcba 100644 (file)
@@ -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;