diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-14 03:04:51 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-14 03:04:51 +0000 |
commit | ffbf8d72d378fde84faa8e81650c5a6e262d5c42 (patch) | |
tree | a72998134b44c01bf35533054132c86884fcc0a3 /file.c | |
parent | ba3fd4b75bdec4aaf56249f3a3a33bc87cc64699 (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@34021 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -881,6 +881,7 @@ struct ast_filestream *ast_writefile(const char *filename, const char *type, con char *fn, *orig_fn = NULL; char *buf = NULL; size_t size = 0; + int format_found = 0; if (ast_mutex_lock(&formatlock)) { ast_log(LOG_WARNING, "Unable to lock format list\n"); @@ -900,6 +901,8 @@ struct ast_filestream *ast_writefile(const char *filename, const char *type, con for (f = formats; f && !fs; f = f->next) { if (!exts_compare(f->exts, type)) continue; + else + format_found = 1; fn = build_filename(filename, type); fd = open(fn, flags | myflags, mode); @@ -980,7 +983,8 @@ struct ast_filestream *ast_writefile(const char *filename, const char *type, con } ast_mutex_unlock(&formatlock); - if (!fs) + + if (!format_found) ast_log(LOG_WARNING, "No such format '%s'\n", type); return fs; |