Index: funcs/func_lock.c =================================================================== --- funcs/func_lock.c (revision 293194) +++ funcs/func_lock.c (working copy) @@ -216,6 +216,7 @@ AST_LIST_HEAD(, channel_lock_frame) *list; int res = 0, *link; struct timespec three_seconds = { .tv_sec = 3 }; + struct timeval now; if (!lock_store) { ast_debug(1, "Channel %s has no lock datastore, so we're allocating one.\n", chan->name); @@ -345,6 +346,10 @@ pthread_kill(broker_tid, SIGURG); AST_LIST_UNLOCK(&locklist); + now = ast_tvnow(); + three_seconds.tv_sec += now.tv_sec; + three_seconds.tv_nsec += now.tv_usec * 1000; + if ((!current->owner) || (!try && !(res = ast_cond_timedwait(¤t->cond, ¤t->mutex, &three_seconds)))) { res = 0;