From 5a08b02e200db6f6c17568c53332443235cded8a Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 2 Nov 2009 22:36:01 +0000 Subject: [PATCH] add non opaque return for switch_thread_cond_timedwait git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15322 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_apr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/switch_apr.c b/src/switch_apr.c index 028c4a5da3..6a0592badc 100644 --- a/src/switch_apr.c +++ b/src/switch_apr.c @@ -365,7 +365,13 @@ SWITCH_DECLARE(switch_status_t) switch_thread_cond_wait(switch_thread_cond_t *co SWITCH_DECLARE(switch_status_t) switch_thread_cond_timedwait(switch_thread_cond_t *cond, switch_mutex_t *mutex, switch_interval_time_t timeout) { - return apr_thread_cond_timedwait(cond, mutex, timeout); + apr_status_t st = apr_thread_cond_timedwait(cond, mutex, timeout); + + if (st == APR_TIMEUP) { + st = SWITCH_STATUS_TIMEOUT; + } + + return st; } SWITCH_DECLARE(switch_status_t) switch_thread_cond_signal(switch_thread_cond_t *cond)