diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-23 18:00:50 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-23 18:00:50 +0000 |
commit | 83dc4d51088942df3bae3b6da37e544e8db04ee2 (patch) | |
tree | 33d4fa4dbacb300bef77eaf0cf137ea082ca82d0 /file.c | |
parent | cb8eee8b42a73eaa5c7c746b0deb317b891de9af (diff) |
Merge Tilghman's voicemail broadcast improvements (thanks!)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3287 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'file.c')
-rwxr-xr-x | file.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -28,6 +28,7 @@ #include <stdio.h> #include <fcntl.h> #include <dirent.h> +#include <sys/types.h> #include <sys/stat.h> #include "asterisk.h" #include "astconf.h" @@ -241,6 +242,7 @@ static int copy(char *infile, char *outfile) int res; int len; char buf[4096]; + if ((ifd = open(infile, O_RDONLY)) < 0) { ast_log(LOG_WARNING, "Unable to open %s in read-only mode\n", infile); return -1; @@ -343,6 +345,9 @@ static int ast_filehelper(char *filename, char *filename2, char *fmt, int action /* Try each kind of extension */ stringp=exts; ext = strsep(&stringp, "|"); + if (!strcmp(ext,"wav49")) { + ext = "WAV"; + } do { fn = build_filename(filename, ext); if (fn) { |