]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Properly handle an ETIMEDOUT result from pthread_cond_timedwait (issue #7318 reported...
authorJoshua Colp <jcolp@digium.com>
Wed, 30 Aug 2006 17:58:31 +0000 (17:58 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 30 Aug 2006 17:58:31 +0000 (17:58 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41390 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/lock.h

index cf9549751b7585114d3fc99e610334a23ed43c06..dc9cf9a280de2581f691f20c2dabd2720ba9fdc6 100644 (file)
@@ -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