/*
- * Copyright (C) 2007-2012 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2007-2013 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
#include "afh.h"
#include "afs.h"
#include "ipc.h"
+#include "sideband.h"
/** \file playlist.c Functions for loading and saving playlists. */
if (ret < 0)
goto err;
playlist->length = 0;
- ret = for_each_line_ro(playlist_def.data, playlist_def.size,
- add_playlist_entry, playlist);
+ ret = for_each_line(FELF_READ_ONLY, playlist_def.data,
+ playlist_def.size, add_playlist_entry, playlist);
osl_close_disk_object(&playlist_def);
if (ret < 0)
goto err;
ret = para_printf(pb, "checking playlist %s...\n", playlist_name);
if (ret < 0)
return ret;
- ret = for_each_line_ro(playlist_def.data, playlist_def.size,
- check_playlist_path, pb);
+ ret = for_each_line(FELF_READ_ONLY, playlist_def.data,
+ playlist_def.size, check_playlist_path, pb);
}
osl_close_disk_object(&playlist_def);
return ret;
.max_size = shm_get_shmmax(),
.private_data = &(struct afs_max_size_handler_data) {
.fd = fd,
+ .band = SBD_OUTPUT
},
.max_size_handler = afs_max_size_handler,
};
osl_rbtree_loop(playlists_table, BLOBCOL_ID, &pb,
check_playlist);
if (pb.offset)
- pass_buffer_as_shm(fd, pb.buf, pb.offset);
+ pass_buffer_as_shm(fd, SBD_OUTPUT, pb.buf, pb.offset);
free(pb.buf);
}
ret = pl_get_def_by_name(current_playlist.name, &playlist_def);
if (ret < 0)
return ret;
- ret = for_each_line_ro(playlist_def.data, playlist_def.size,
- search_path, new_path);
+ ret = for_each_line(FELF_READ_ONLY, playlist_def.data,
+ playlist_def.size, search_path, new_path);
osl_close_disk_object(&playlist_def);
is_admissible = (ret < 0);
if (was_admissible && is_admissible)