]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - playlist.c
com_cpsi(): Return negative on errors
[paraslash.git] / playlist.c
index 46333a00eef684cac5c3f5812811551875e8ad2a..e3569358fffeac5dd83799ef6cea60a078edf9ee 100644 (file)
@@ -126,8 +126,10 @@ 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.
  */
-void playlist_check_callback(int fd, __a_unused const struct osl_object *query)
+int playlist_check_callback(int fd, __a_unused const struct osl_object *query)
 {
        struct para_buffer pb = {
                .max_size = shm_get_shmmax(),
@@ -140,9 +142,8 @@ void playlist_check_callback(int fd, __a_unused const struct osl_object *query)
        para_printf(&pb, "checking playlists...\n");
        osl_rbtree_loop(playlists_table, BLOBCOL_ID, &pb,
                check_playlist);
-       if (pb.offset)
-               pass_buffer_as_shm(fd, SBD_OUTPUT, pb.buf, pb.offset);
-       free(pb.buf);
+       flush_and_free_pb(&pb);
+       return 0;
 }
 
 /**