[Asterisk-cvs] asterisk/cdr cdr_csv.c,1.10,1.11

markster at lists.digium.com markster at lists.digium.com
Wed Dec 15 15:52:53 CST 2004


Update of /usr/cvsroot/asterisk/cdr
In directory mongoose.digium.com:/tmp/cvs-serv31871/cdr

Modified Files:
	cdr_csv.c 
Log Message:
Extra debugging in CDRCSV (bug #3063)


Index: cdr_csv.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cdr/cdr_csv.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cdr_csv.c	7 Oct 2004 17:50:15 -0000	1.10
+++ cdr_csv.c	15 Dec 2004 20:49:33 -0000	1.11
@@ -33,6 +33,7 @@
 
 #include <stdio.h>
 #include <string.h>
+#include <errno.h>
 
 #include <stdlib.h>
 #include <unistd.h>
@@ -218,7 +219,7 @@
 		   we open write and close the log file each time */
 		mf = fopen(csvmaster, "a");
 		if (!mf) {
-			ast_log(LOG_ERROR, "Unable to re-open master file %s\n", csvmaster);
+			ast_log(LOG_ERROR, "Unable to re-open master file %s : %s\n", csvmaster, strerror(errno));
 		}
 		if (mf) {
 			fputs(buf, mf);
@@ -228,7 +229,7 @@
 		}
 		if (!ast_strlen_zero(cdr->accountcode)) {
 			if (writefile(buf, cdr->accountcode))
-				ast_log(LOG_WARNING, "Unable to write CSV record to account file '%s'\n", cdr->accountcode);
+				ast_log(LOG_WARNING, "Unable to write CSV record to account file '%s' : %s\n", cdr->accountcode, strerror(errno));
 		}
 	}
 	return 0;




More information about the svn-commits mailing list