diff options
Diffstat (limited to 'funcs/func_timeout.c')
-rw-r--r-- | funcs/func_timeout.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/funcs/func_timeout.c b/funcs/func_timeout.c index 3c2810fd5..e93ce3f62 100644 --- a/funcs/func_timeout.c +++ b/funcs/func_timeout.c @@ -155,7 +155,9 @@ static int timeout_write(struct ast_channel *chan, const char *cmd, char *data, switch (*data) { case 'a': case 'A': + ast_channel_lock(chan); ast_channel_setwhentohangup_tv(chan, when); + ast_channel_unlock(chan); if (!ast_tvzero(*ast_channel_whentohangup(chan))) { when = ast_tvadd(when, ast_tvnow()); ast_strftime(timestr, sizeof(timestr), "%Y-%m-%d %H:%M:%S.%3q %Z", |