Add missing osl() wrapper calls.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 21 Dec 2014 14:28:34 +0000 (14:28 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 11 Jan 2015 14:55:53 +0000 (15:55 +0100)
Some calls to osl library functions were missing the osl() wrapper
which transforms the osl error code into a paraslash error code.
This results in an incorrect error message on failure or worse.

print_chunk_table() and open_and_update_audio_file() of aft.c are
affected as well as the xxx_create() functions of blob.c.

aft.c
blob.c

diff --git a/aft.c b/aft.c
index a2883d4af1438ea9ab30e93a94ebc1a3ba5b1419..df34fa145faed3281bb373c03b52db1b64800400 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -830,8 +830,8 @@ static int print_chunk_table(struct ls_data *d, struct para_buffer *b)
        ret = aft_get_row_of_hash(d->hash, &aft_row);
        if (ret < 0)
                return ret;
-       ret = osl_open_disk_object(audio_file_table, aft_row,
-               AFTCOL_CHUNKS, &chunk_table_obj);
+       ret = osl(osl_open_disk_object(audio_file_table, aft_row,
+               AFTCOL_CHUNKS, &chunk_table_obj));
        if (ret < 0)
                return ret;
        ret = para_printf(b, "%s\n"
@@ -1106,8 +1106,8 @@ int open_and_update_audio_file(struct osl_row *aft_row, long score,
        if (ret < 0)
                return ret;
        afd->afhi.chunk_table = NULL;
-       ret = osl_open_disk_object(audio_file_table, aft_row,
-               AFTCOL_CHUNKS, &chunk_table_obj);
+       ret = osl(osl_open_disk_object(audio_file_table, aft_row,
+               AFTCOL_CHUNKS, &chunk_table_obj));
        if (ret < 0)
                goto err;
        ret = mmap_full_file(path, O_RDONLY, &map.data,
diff --git a/blob.c b/blob.c
index cd571d74e5d40f71286ef8dc19aca635778f9429..2f17502143521db2b5178ea457e3149abb60a82f 100644 (file)
--- a/blob.c
+++ b/blob.c
@@ -618,7 +618,7 @@ static int blob_get_name_and_def_by_row(struct osl_table *table,
        static int table_name ## _create(const char *dir) \
        { \
                table_name ## _table_desc.dir = dir; \
-               return osl_create_table(&table_name ## _table_desc); \
+               return osl(osl_create_table(&table_name ## _table_desc)); \
        }
 
 static int blob_open(struct osl_table **table,