diff options
Diffstat (limited to 'apps/app_waituntil.c')
-rw-r--r-- | apps/app_waituntil.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/app_waituntil.c b/apps/app_waituntil.c index 98345b141..8b903b0ba 100644 --- a/apps/app_waituntil.c +++ b/apps/app_waituntil.c @@ -50,7 +50,7 @@ static int waituntil_exec(struct ast_channel *chan, void *data) double fraction; long seconds; struct timeval future = { 0, }; - struct timeval tv = ast_tvnow(); + struct timeval now = ast_tvnow(); int msec; if (ast_strlen_zero(data)) { @@ -68,8 +68,8 @@ static int waituntil_exec(struct ast_channel *chan, void *data) future.tv_sec = seconds; future.tv_usec = fraction * 1000000; - if ((msec = ast_tvdiff_ms(future, tv)) < 0) { - ast_log(LOG_NOTICE, "WaitUntil called in the past (now %ld, arg %ld)\n", (long)tv.tv_sec, (long)future.tv_sec); + if ((msec = ast_tvdiff_ms(future, now)) < 0) { + ast_log(LOG_NOTICE, "WaitUntil called in the past (now %ld, arg %ld)\n", (long)now.tv_sec, (long)future.tv_sec); pbx_builtin_setvar_helper(chan, "WAITUNTILSTATUS", "PAST"); return 0; } |