[Asterisk-cvs] asterisk/cdr cdr_pgsql.c,1.7,1.8
citats at lists.digium.com
citats at lists.digium.com
Fri Jul 9 12:33:13 CDT 2004
Update of /usr/cvsroot/asterisk/cdr
In directory mongoose.digium.com:/home/citats/cvs/asterisk/cdr
Modified Files:
cdr_pgsql.c
Log Message:
Fixes from bkw_. Formatting in app_db.c and handle start right in cdr_pgsql.c
Index: cdr_pgsql.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cdr/cdr_pgsql.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cdr_pgsql.c 9 Jun 2004 01:45:07 -0000 1.7
+++ cdr_pgsql.c 9 Jul 2004 16:19:00 -0000 1.8
@@ -49,18 +49,14 @@
static int pgsql_log(struct ast_cdr *cdr)
{
struct tm tm;
- struct timeval tv;
char sqlcmd[2048], timestr[128];
- time_t t;
- char *pgerror;
+ char *pgerror;
ast_mutex_lock(&pgsql_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) && pghostname && pgdbuser && pgpassword && pgdbname) {
More information about the svn-commits
mailing list