summaryrefslogtreecommitdiff
path: root/funcs/func_timeout.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2012-02-29 16:52:47 +0000
committerTerry Wilson <twilson@digium.com>2012-02-29 16:52:47 +0000
commita9d607a35764d93790172cab1f630e14fb8e043c (patch)
treedadea55813cfc525898844c51eec824d468455cb /funcs/func_timeout.c
parent0b988da21c1ec856b7b8bad2434bf93498d17cfd (diff)
Opaquify ast_channel structs and lists
Review: https://reviewboard.asterisk.org/r/1773/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/func_timeout.c')
-rw-r--r--funcs/func_timeout.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/funcs/func_timeout.c b/funcs/func_timeout.c
index aef0a4033..3c2810fd5 100644
--- a/funcs/func_timeout.c
+++ b/funcs/func_timeout.c
@@ -90,11 +90,11 @@ static int timeout_read(struct ast_channel *chan, const char *cmd, char *data,
switch (*data) {
case 'a':
case 'A':
- if (ast_tvzero(chan->whentohangup)) {
+ if (ast_tvzero(*ast_channel_whentohangup(chan))) {
ast_copy_string(buf, "0", len);
} else {
myt = ast_tvnow();
- snprintf(buf, len, "%.3f", ast_tvdiff_ms(chan->whentohangup, myt) / 1000.0);
+ snprintf(buf, len, "%.3f", ast_tvdiff_ms(*ast_channel_whentohangup(chan), myt) / 1000.0);
}
break;
@@ -156,7 +156,7 @@ static int timeout_write(struct ast_channel *chan, const char *cmd, char *data,
case 'a':
case 'A':
ast_channel_setwhentohangup_tv(chan, when);
- if (!ast_tvzero(chan->whentohangup)) {
+ 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",
ast_localtime(&when, &myt, NULL));