[asterisk-commits] murf: branch 1.6.0 r107289 - in /branches/1.6.0: ./ main/cdr.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 10 18:46:04 CDT 2008


Author: murf
Date: Mon Mar 10 18:46:02 2008
New Revision: 107289

URL: http://svn.digium.com/view/asterisk?view=rev&rev=107289
Log:
Merged revisions 107019 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r107019 | murf | 2008-03-10 08:55:21 -0600 (Mon, 10 Mar 2008) | 1 line

way back in July, in r.75706, a fix was made ot the strftime usages, which was good, but in this case, the check for a nil time was accidentally removed, and now it is restored, to keep timevals like '1969-12-31 17:00:00' from showing up in the cdrs. No idea what databases will do with this. No bugs filed as yet, but it felt like a bug.
........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/cdr.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/main/cdr.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/cdr.c?view=diff&rev=107289&r1=107288&r2=107289
==============================================================================
--- branches/1.6.0/main/cdr.c (original)
+++ branches/1.6.0/main/cdr.c Mon Mar 10 18:46:02 2008
@@ -200,11 +200,13 @@
 {
 	if (fmt == NULL) {	/* raw mode */
 		snprintf(buf, bufsize, "%ld.%06ld", (long)tv.tv_sec, (long)tv.tv_usec);
-	} else {  
-		struct ast_tm tm;
-
-		ast_localtime(&tv, &tm, NULL);
-		ast_strftime(buf, bufsize, fmt, &tm);
+	} else {
+		if (tv.tv_sec) {
+			struct ast_tm tm;
+			
+			ast_localtime(&tv, &tm, NULL);
+			ast_strftime(buf, bufsize, fmt, &tm);
+		}
 	}
 }
 




More information about the asterisk-commits mailing list