[Asterisk-cvs] asterisk/cdr cdr_csv.c,1.9,1.9.2.1

russell at lists.digium.com russell at lists.digium.com
Thu Oct 7 22:41:54 CDT 2004


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

Modified Files:
      Tag: v1-0
	cdr_csv.c 
Log Message:
Always fflush for any CDR file (not only for Master.csv) (bug #2586)


Index: cdr_csv.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cdr/cdr_csv.c,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -d -r1.9 -r1.9.2.1
--- cdr_csv.c	14 Jul 2004 13:57:15 -0000	1.9
+++ cdr_csv.c	8 Oct 2004 02:43:08 -0000	1.9.2.1
@@ -184,7 +184,7 @@
 
 static int writefile(char *s, char *acc)
 {
-	char tmp[256];
+	char tmp[AST_CONFIG_MAX_PATH];
 	FILE *f;
 	if (strchr(acc, '/') || (acc[0] == '.')) {
 		ast_log(LOG_WARNING, "Account code '%s' insecure for writing file\n", acc);
@@ -195,6 +195,7 @@
 	if (!f)
 		return -1;
 	fputs(s, f);
+	fflush(f);
 	fclose(f);
 	return 0;
 }




More information about the svn-commits mailing list