*/
int mood_check_callback(struct afs_callback_arg *aca)
{
- int ret;
- struct para_buffer pb = {
- .max_size = shm_get_shmmax(),
- .private_data = &(struct afs_max_size_handler_data) {
- .fd = aca->fd,
- .band = SBD_OUTPUT
- },
- .max_size_handler = afs_max_size_handler
- };
-
- para_printf(&pb, "checking moods...\n");
- ret = osl(osl_rbtree_loop(moods_table, BLOBCOL_ID, &pb,
+ para_printf(&aca->pbout, "checking moods...\n");
+ return osl(osl_rbtree_loop(moods_table, BLOBCOL_ID, &aca->pbout,
check_mood));
- flush_and_free_pb(&pb);
- return ret;
}
static int64_t normalized_value(int64_t x, int64_t n, int64_t sum, int64_t qd)