[Asterisk-cvs] asterisk-addons cdr_addon_mysql.c,1.4,1.5

citats at lists.digium.com citats at lists.digium.com
Fri Jul 9 12:38:41 CDT 2004


Update of /usr/cvsroot/asterisk-addons
In directory mongoose.digium.com:/home/citats/cvs/asterisk-addons

Modified Files:
	cdr_addon_mysql.c 
Log Message:
Fix from bkw_.  Fix start time in cdr_mysql

Index: cdr_addon_mysql.c
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/cdr_addon_mysql.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cdr_addon_mysql.c	9 Jun 2004 18:47:17 -0000	1.4
+++ cdr_addon_mysql.c	9 Jul 2004 16:24:28 -0000	1.5
@@ -103,15 +103,12 @@
 	struct localuser *u;
 	char *userfielddata = NULL;
 	char sqlcmd[2048], timestr[128];
-	time_t t;
 
 	ast_mutex_lock(&mysql_lock);
 
 	memset(sqlcmd,0,2048);
 
-	gettimeofday(&tv,NULL);
-	t = tv.tv_sec;
-	localtime_r(&t,&tm);
+	localtime_r(&cdr->start.tv_sec,&tm);
 	strftime(timestr,128,DATE_FORMAT,&tm);
 
 	if ((!connected) && (hostname || dbsock) && dbuser && password && dbname) {




More information about the svn-commits mailing list