From: Andre Noll Date: Sun, 5 Apr 2015 16:04:20 +0000 (+0000) Subject: playlist_check_callback(): Return negative on errors X-Git-Tag: v0.5.6~94^2~8 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=4ed1b8bcba134e2656eaff91053397064c538bd5 playlist_check_callback(): Return negative on errors --- diff --git a/playlist.c b/playlist.c index e3569358..e8037fbc 100644 --- a/playlist.c +++ b/playlist.c @@ -127,10 +127,12 @@ static int check_playlist(struct osl_row *row, void *data) * \param fd The afs socket. * \param query Unused. * - * \return Currently this function always returns zero. + * \return Standard. Invalid paths are reported, but are not considered an + * error. */ int playlist_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) { @@ -140,10 +142,10 @@ int playlist_check_callback(int fd, __a_unused const struct osl_object *query) .max_size_handler = afs_max_size_handler, }; para_printf(&pb, "checking playlists...\n"); - osl_rbtree_loop(playlists_table, BLOBCOL_ID, &pb, - check_playlist); + ret = osl(osl_rbtree_loop(playlists_table, BLOBCOL_ID, &pb, + check_playlist)); flush_and_free_pb(&pb); - return 0; + return ret; } /**