playlist_check_callback(): Return negative on errors
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 5 Apr 2015 16:04:20 +0000 (16:04 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 12 Aug 2015 21:23:48 +0000 (23:23 +0200)
playlist.c

index e356935..e8037fb 100644 (file)
@@ -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;
 }
 
 /**