[asterisk-commits] branch 1.2 r33993 - /branches/1.2/file.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Jun 13 19:20:22 MST 2006
Author: kpfleming
Date: Tue Jun 13 21:20:22 2006
New Revision: 33993
URL: http://svn.digium.com/view/asterisk?rev=33993&view=rev
Log:
don't output 'no format found' when we _did_ find the format but couldn't open the desired file for some other reason
Modified:
branches/1.2/file.c
Modified: branches/1.2/file.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/file.c?rev=33993&r1=33992&r2=33993&view=diff
==============================================================================
--- branches/1.2/file.c (original)
+++ branches/1.2/file.c Tue Jun 13 21:20:22 2006
@@ -881,6 +881,7 @@
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 @@
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 @@
}
ast_mutex_unlock(&formatlock);
- if (!fs)
+
+ if (!format_found)
ast_log(LOG_WARNING, "No such format '%s'\n", type);
return fs;
More information about the asterisk-commits
mailing list