[Asterisk-cvs] asterisk file.c,1.55,1.56

markster at lists.digium.com markster at lists.digium.com
Wed Feb 2 23:33:55 CST 2005


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

Modified Files:
	file.c 
Log Message:
Fix wav append mode (bug #3498)


Index: file.c
===================================================================
RCS file: /usr/cvsroot/asterisk/file.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- file.c	10 Jan 2005 04:18:17 -0000	1.55
+++ file.c	3 Feb 2005 05:35:03 -0000	1.56
@@ -855,8 +855,12 @@
 		return NULL;
 	}
 	/* set the O_TRUNC flag if and only if there is no O_APPEND specified */
-	if (!(flags & O_APPEND)) 
+	if (flags & O_APPEND) { 
+		/* We really can't use O_APPEND as it will break WAV header updates */
+		flags &= ~O_APPEND;
+	} else {
 		myflags = O_TRUNC;
+	}
 	
 	myflags |= O_WRONLY | O_CREAT;
 




More information about the svn-commits mailing list