]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
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 c2fd6d52daa58ef4cf0a118ce855898465053f2b..0464eb77de8918f8b38d5a41c5a792212a271c5f 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 266188b5b370a3e7e3e8aaa092ca093aca7c6c04..b3dde1379997bb6f69647255d0ac53fb703fce09 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;
 }