summaryrefslogtreecommitdiff
path: root/apps/app_rpt.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2007-07-19 03:37:12 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2007-07-19 03:37:12 +0000
commit24935c030486cb8096015353193d24b2121f8c4a (patch)
tree12f508c538a33950415a226c61b92d86446fc30a /apps/app_rpt.c
parent204743a8209e10e32860af5739929db4f6b07306 (diff)
Fix trunk where I broke it earlier (for ast_strftime branch)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_rpt.c')
-rw-r--r--apps/app_rpt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/app_rpt.c b/apps/app_rpt.c
index c81fbbdb0..5ef62d9e5 100644
--- a/apps/app_rpt.c
+++ b/apps/app_rpt.c
@@ -1890,7 +1890,7 @@ static void *rpt_tele_thread(void *this)
struct rpt_link *l, *m, linkbase;
struct ast_channel *mychannel;
const char *p, *ct;
- time_t t;
+ struct timeval tv;
struct ast_tm localtm;
#ifdef APP_RPT_LOCK_DEBUG
struct lockthread *t;
@@ -2339,8 +2339,8 @@ static void *rpt_tele_thread(void *this)
case STATS_TIME:
wait_interval(myrpt, DLY_TELEM, mychannel); /* Wait a little bit */
- t = time(NULL);
- ast_localtime(&t, &localtm, NULL);
+ tv = ast_tvnow();
+ ast_localtime(&tv, &localtm, NULL);
/* Say the phase of the day is before the time */
if ((localtm.tm_hour >= 0) && (localtm.tm_hour < 12))
p = "rpt/goodmorning";
@@ -2358,7 +2358,7 @@ static void *rpt_tele_thread(void *this)
break;
}
/* Say the time */
- res = ast_say_time(mychannel, t, "", mychannel->language);
+ res = ast_say_time(mychannel, tv.tv_sec, "", mychannel->language);
if (!res)
res = ast_waitstream(mychannel, "");
ast_stopstream(mychannel);
@@ -5632,7 +5632,7 @@ static void do_scheduler(struct rpt *myrpt)
if (myrpt->lasttv.tv_sec == myrpt->curtv.tv_sec)
return;
- ast_localtime(&myrpt->curtv.tv_sec, &tmnow, NULL);
+ ast_localtime(&myrpt->curtv, &tmnow, NULL);
/* If midnight, then reset all daily statistics */