From 015ff5d787e6a28432d176002cc19cec1247407b Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Sat, 1 Mar 2014 15:40:58 -0600 Subject: [PATCH] windows fix last commit --- src/switch_apr.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/switch_apr.c b/src/switch_apr.c index 7e8f04008c..10b1291e89 100644 --- a/src/switch_apr.c +++ b/src/switch_apr.c @@ -625,6 +625,15 @@ struct apr_threadattr_t { apr_size_t stacksize; int priority; }; +struct apr_thread_t { + apr_pool_t *pool; + HANDLE td; + apr_int32_t cancel; + apr_int32_t cancel_how; + void *data; + apr_thread_start_t func; + apr_status_t exitval; +}; #endif @@ -666,7 +675,7 @@ SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t ** new_thre status = apr_thread_create(new_thread, attr, func, data, cont); #ifdef WIN32 if (attr->priority == SWITCH_PRI_REALTIME) { - SetThreadPriority(new_thread, THREAD_PRIORITY_HIGHEST); + SetThreadPriority(((apr_thread_t*)*new_thread)->td, THREAD_PRIORITY_HIGHEST); } #endif return (switch_status_t)status;