From 4ed1b8bcba134e2656eaff91053397064c538bd5 Mon Sep 17 00:00:00 2001
From: Andre Noll <maan@tuebingen.mpg.de>
Date: Sun, 5 Apr 2015 16:04:20 +0000
Subject: [PATCH] playlist_check_callback(): Return negative on errors

---
 playlist.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

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;
 }
 
 /**
-- 
2.39.5