[svn-commits] tilghman: trunk r75841 - /trunk/apps/app_rpt.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jul 18 22:37:12 CDT 2007
Author: tilghman
Date: Wed Jul 18 22:37:12 2007
New Revision: 75841
URL: http://svn.digium.com/view/asterisk?view=rev&rev=75841
Log:
Fix trunk where I broke it earlier (for ast_strftime branch)
Modified:
trunk/apps/app_rpt.c
Modified: trunk/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_rpt.c?view=diff&rev=75841&r1=75840&r2=75841
==============================================================================
--- trunk/apps/app_rpt.c (original)
+++ trunk/apps/app_rpt.c Wed Jul 18 22:37:12 2007
@@ -1890,7 +1890,7 @@
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 @@
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 @@
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 @@
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 */
More information about the svn-commits
mailing list