From: Joshua Colp Date: Wed, 30 Aug 2006 17:58:31 +0000 (+0000) Subject: Properly handle an ETIMEDOUT result from pthread_cond_timedwait (issue #7318 reported... X-Git-Tag: 1.2.12~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b466228c483bc14b7e09a64f563d03a29f5b0e8;p=thirdparty%2Fasterisk.git Properly handle an ETIMEDOUT result from pthread_cond_timedwait (issue #7318 reported by arkadia) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41390 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h index cf9549751b..dc9cf9a280 100644 --- a/include/asterisk/lock.h +++ b/include/asterisk/lock.h @@ -485,7 +485,7 @@ static inline int __ast_cond_timedwait(const char *filename, int lineno, const c t->thread[t->reentrancy] = 0; } - if ((res = pthread_cond_timedwait(cond, &t->mutex, abstime))) { + if ((res = pthread_cond_timedwait(cond, &t->mutex, abstime)) && (res != ETIMEDOUT)) { __ast_mutex_logger("%s line %d (%s): Error waiting on condition mutex '%s'\n", filename, lineno, func, strerror(res)); #ifdef THREAD_CRASH