X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=aft.c;h=0207705f858a3beb77c98a6a7e0e6a2c123e68b6;hp=c255b245fdf0209f0c8b09ba0b28310fddcb8fa5;hb=b605df7dcee2c6e642a141aea24e643eb6ca34ec;hpb=9602629057e1016f8ca7dfa2aae1477e4faece65 diff --git a/aft.c b/aft.c index c255b245..0207705f 100644 --- a/aft.c +++ b/aft.c @@ -2506,7 +2506,7 @@ int send_afs_status(struct command_context *cc, int parser_friendly) afs_cb_result_handler, cc); } -/* returns success even on errors to keep the loop going */ +/* returns success on non-fatal errors to keep the loop going */ static int check_audio_file(struct osl_row *row, void *data) { char *path; @@ -2518,7 +2518,7 @@ static int check_audio_file(struct osl_row *row, void *data) if (ret < 0) { para_printf(pb, "%s\n", para_strerror(-ret)); - return 0; + return ret; } if (stat(path, &statbuf) < 0) para_printf(pb, "%s: stat error (%s)\n", path, strerror(errno)); @@ -2546,12 +2546,13 @@ static int check_audio_file(struct osl_row *row, void *data) * \param fd The afs socket. * \param query Unused. * - * \return This function always returns zero. + * \return Standard. Inconsistencies are reported but not regarded as an error. * * \sa com_check(). */ int aft_check_callback(int fd, __a_unused const struct osl_object *query) { + int ret; struct para_buffer pb = { .max_size = shm_get_shmmax(), .private_data = &(struct afs_max_size_handler_data) { @@ -2561,9 +2562,9 @@ int aft_check_callback(int fd, __a_unused const struct osl_object *query) .max_size_handler = afs_max_size_handler }; para_printf(&pb, "checking audio file table...\n"); - audio_file_loop(&pb, check_audio_file); + ret = audio_file_loop(&pb, check_audio_file); flush_and_free_pb(&pb); - return 0; + return ret; } /**