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");
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);
}
ast_mutex_unlock(&formatlock);
- if (!fs)
+
+ if (!format_found)
ast_log(LOG_WARNING, "No such format '%s'\n", type);
return fs;