summaryrefslogtreecommitdiff
blob: b07c1fb93bce1ccb17b6269ce68fab3fadf08e4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
diff -uNr asterisk-1.2.31.1.ORIG/apps/app_chanspy.c asterisk-1.2.31.1/apps/app_chanspy.c
--- asterisk-1.2.31.1.ORIG/apps/app_chanspy.c	2009-03-11 15:37:50.000000000 +0000
+++ asterisk-1.2.31.1/apps/app_chanspy.c	2009-03-11 15:38:55.000000000 +0000
@@ -438,7 +438,7 @@
 	if (recbase) {
 		char filename[512];
 		snprintf(filename,sizeof(filename),"%s/%s.%d.raw",ast_config_AST_MONITOR_DIR, recbase, (int)time(NULL));
-		if ((fd = open(filename, O_CREAT | O_WRONLY, O_TRUNC, 0644)) <= 0) {
+		if ((fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644)) <= 0) {
 			ast_log(LOG_WARNING, "Cannot open %s for recording\n", filename);
 			fd = 0;
 		}