diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-14 02:21:47 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-14 02:21:47 +0000 |
commit | d433b2eaba39b9545398648e02f5aae193ab5fe2 (patch) | |
tree | e24cd6e2067e9c06c974391249ea085b40608c69 /file.c | |
parent | 4ea7c6bef6b6b81caa38ec2a54187e71f322995d (diff) |
Merged revisions 33993 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r33993 | kpfleming | 2006-06-13 21:20:22 -0500 (Tue, 13 Jun 2006) | 2 lines
don't output 'no format found' when we _did_ find the format but couldn't open the desired file for some other reason
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@33994 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -866,6 +866,7 @@ struct ast_filestream *ast_writefile(const char *filename, const char *type, con struct ast_filestream *fs = NULL; char *buf = NULL; size_t size = 0; + int format_found = 0; if (AST_LIST_LOCK(&formats)) { ast_log(LOG_WARNING, "Unable to lock format list\n"); @@ -892,6 +893,8 @@ struct ast_filestream *ast_writefile(const char *filename, const char *type, con if (!exts_compare(f->exts, type)) continue; + else + format_found = 1; fn = build_filename(filename, type); fd = open(fn, flags | myflags, mode); @@ -974,7 +977,8 @@ struct ast_filestream *ast_writefile(const char *filename, const char *type, con } AST_LIST_UNLOCK(&formats); - if (!fs) + + if (!format_found) ast_log(LOG_WARNING, "No such format '%s'\n", type); return fs; |