open_and_update_audio_file(): Always print file name on errors.
authorAndre Noll <maan@systemlinux.org>
Fri, 18 Mar 2011 08:08:07 +0000 (09:08 +0100)
committerAndre Noll <maan@systemlinux.org>
Fri, 18 Mar 2011 08:08:07 +0000 (09:08 +0100)
Otherwise, if running with logleve warning or error, we only see
the error message but not which file could not be opened.

afs.c
aft.c

diff --git a/afs.c b/afs.c
index c2fd6d5..0464eb7 100644 (file)
--- a/afs.c
+++ b/afs.c
@@ -468,7 +468,6 @@ again:
        }
        ret = open_and_update_audio_file(aft_row, score, &afd);
        if (ret < 0) {
-               PARA_ERROR_LOG("%s\n", para_strerror(-ret));
                ret = score_delete(aft_row);
                if (ret < 0) {
                        PARA_ERROR_LOG("%s\n", para_strerror(-ret));
diff --git a/aft.c b/aft.c
index 266188b..b3dde13 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -1136,6 +1136,8 @@ int open_and_update_audio_file(struct osl_row *aft_row, long score,
 err:
        free(afd->afhi.chunk_table);
        osl_close_disk_object(&chunk_table_obj);
+       if (ret < 0)
+               PARA_ERROR_LOG("%s: %s\n", path, para_strerror(-ret));
        return ret;
 }