Hi,
On Windows apr_os_threads_t is defined as HANDLE, but in
apr_os_thread_get and apr_os_thread_put implementation for Win32, it
mis-use apr_os_thread_t* as HANDLE(thd->td is a HANDLE).
Attached is a patch fix that issue, could someone please review it?
Cheers,
Henry
Index: threadproc/win32/thread.c
===================================================================
--- threadproc/win32/thread.c (revision 440895)
+++ threadproc/win32/thread.c (working copy)
@@ -234,7 +234,7 @@
if (thd == NULL) {
return APR_ENOTHREAD;
}
- *thethd = thd->td;
+ *thethd = &thd->td;
return APR_SUCCESS;
}
@@ -249,7 +249,7 @@
(*thd) = (apr_thread_t *)apr_palloc(pool, sizeof(apr_thread_t));
(*thd)->pool = pool;
}
- (*thd)->td = thethd;
+ (*thd)->td = *thethd;
return APR_SUCCESS;
}