[asterisk-commits] tilghman: branch 1.4 r78146 - /branches/1.4/cdr/cdr_pgsql.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Aug 5 09:18:01 CDT 2007
Author: tilghman
Date: Sun Aug 5 09:18:00 2007
New Revision: 78146
URL: http://svn.digium.com/view/asterisk?view=rev&rev=78146
Log:
Portability fix for devmode compiling (closes bug #10382)
Modified:
branches/1.4/cdr/cdr_pgsql.c
Modified: branches/1.4/cdr/cdr_pgsql.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/cdr/cdr_pgsql.c?view=diff&rev=78146&r1=78145&r2=78146
==============================================================================
--- branches/1.4/cdr/cdr_pgsql.c (original)
+++ branches/1.4/cdr/cdr_pgsql.c Sun Aug 5 09:18:00 2007
@@ -71,13 +71,14 @@
static int pgsql_log(struct ast_cdr *cdr)
{
struct tm tm;
+ time_t t = cdr->start.tv_sec;
char sqlcmd[2048] = "", timestr[128];
char *pgerror;
PGresult *result;
ast_mutex_lock(&pgsql_lock);
- ast_localtime(&cdr->start.tv_sec, &tm, NULL);
+ ast_localtime(&t, &tm, NULL);
strftime(timestr, sizeof(timestr), DATE_FORMAT, &tm);
if ((!connected) && pghostname && pgdbuser && pgpassword && pgdbname) {
More information about the asterisk-commits
mailing list