From: Andre Noll Date: Sun, 21 Dec 2014 14:28:34 +0000 (+0000) Subject: Add missing osl() wrapper calls. X-Git-Tag: v0.5.4~3^2~3 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=83de7d8cce8b95628507bd151444a51e172991fb;ds=inline Add missing osl() wrapper calls. 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. --- diff --git a/aft.c b/aft.c index a2883d4a..df34fa14 100644 --- 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 cd571d74..2f175021 100644 --- 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,