[Asterisk-cvs] asterisk/funcs func_strings.c,1.5,1.6
kpfleming at lists.digium.com
kpfleming at lists.digium.com
Fri Jul 15 18:52:58 CDT 2005
- Previous message: [Asterisk-cvs] asterisk/apps app_alarmreceiver.c, 1.13,
1.14 app_disa.c, 1.29, 1.30 app_dumpchan.c, 1.8,
1.9 app_forkcdr.c, 1.9, 1.10 app_mp3.c, 1.25,
1.26 app_nbscat.c, 1.10, 1.11 app_readfile.c, 1.6,
1.7 app_sayunixtime.c, 1.10, 1.11 app_sms.c, 1.24,
1.25 app_talkdetect.c, 1.10, 1.11 app_test.c, 1.10,
1.11 app_voicemail.c, 1.231, 1.232
- Next message: [Asterisk-cvs] asterisk/include/asterisk sched.h, 1.7, 1.8 time.h,
1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk/funcs
In directory mongoose.digium.com:/tmp/cvs-serv13236/funcs
Modified Files:
func_strings.c
Log Message:
add a library of timeval manipulation functions, and change a large number of usses to use the new functions (bug #4504)
Index: func_strings.c
===================================================================
RCS file: /usr/cvsroot/asterisk/funcs/func_strings.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- func_strings.c 6 Jun 2005 22:12:19 -0000 1.5
+++ func_strings.c 15 Jul 2005 23:00:47 -0000 1.6
@@ -127,7 +127,6 @@
{
char *format, *epoch, *timezone;
long epochi;
- struct timeval tv;
struct tm time;
if (data) {
@@ -137,11 +136,9 @@
timezone = strsep(&format, "|");
if (epoch && !ast_strlen_zero(epoch) && sscanf(epoch, "%ld", &epochi) == 1) {
- } else if (!gettimeofday(&tv, NULL)) {
- epochi = tv.tv_sec;
} else {
- ast_log(LOG_ERROR, "Cannot gettimeofday() ?!!\n");
- return "";
+ struct timeval tv = ast_tvnow();
+ epochi = tv.tv_sec;
}
ast_localtime(&epochi, &time, timezone);
- Previous message: [Asterisk-cvs] asterisk/apps app_alarmreceiver.c, 1.13,
1.14 app_disa.c, 1.29, 1.30 app_dumpchan.c, 1.8,
1.9 app_forkcdr.c, 1.9, 1.10 app_mp3.c, 1.25,
1.26 app_nbscat.c, 1.10, 1.11 app_readfile.c, 1.6,
1.7 app_sayunixtime.c, 1.10, 1.11 app_sms.c, 1.24,
1.25 app_talkdetect.c, 1.10, 1.11 app_test.c, 1.10,
1.11 app_voicemail.c, 1.231, 1.232
- Next message: [Asterisk-cvs] asterisk/include/asterisk sched.h, 1.7, 1.8 time.h,
1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list