X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audiod.c;h=6fd101a093b2f7f94abe43cab0331781c8a57a3a;hp=ee1364433e77de965e715fe59692040e6e590989;hb=197a489a36e7b11264c87aeae67f3553172e598c;hpb=ba0c0797c76a2c94cb4a9f6938274fea5ba0226f diff --git a/audiod.c b/audiod.c index ee136443..6fd101a0 100644 --- a/audiod.c +++ b/audiod.c @@ -93,11 +93,7 @@ enum vss_status_flags { */ struct sched sched = {.max_fileno = 0}; -/** - * The task for obtaining para_server's status (para_client stat). - * - * \sa struct task, struct sched. - */ +/* The task for obtaining para_server's status (para_client stat). */ struct status_task { /** The associated task structure of audiod. */ struct task *task; @@ -1004,16 +1000,15 @@ err: exit(EXIT_FAILURE); } -static void signal_pre_select(struct sched *s, struct task *t) +static void signal_pre_select(struct sched *s, void *context) { - struct signal_task *st = task_context(t); + struct signal_task *st = context; para_fd_set(st->fd, &s->rfds, &s->max_fileno); } -static int signal_post_select(struct sched *s, __a_unused struct task *t) +static int signal_post_select(struct sched *s, __a_unused void *context) { int signum; - signum = para_next_signal(&s->rfds); switch (signum) { case SIGINT: @@ -1025,16 +1020,16 @@ static int signal_post_select(struct sched *s, __a_unused struct task *t) return 0; } -static void command_pre_select(struct sched *s, struct task *t) +static void command_pre_select(struct sched *s, void *context) { - struct command_task *ct = task_context(t); + struct command_task *ct = context; para_fd_set(ct->fd, &s->rfds, &s->max_fileno); } -static int command_post_select(struct sched *s, struct task *t) +static int command_post_select(struct sched *s, void *context) { int ret; - struct command_task *ct = task_context(t); + struct command_task *ct = context; static struct timeval last_status_dump; struct timeval tmp, delay; bool force = true; @@ -1083,8 +1078,8 @@ static void close_stat_pipe(void) { if (!stat_task->ct) return; - client_close(stat_task->ct); task_reap(&stat_task->ct->task); + client_close(stat_task->ct); stat_task->ct = NULL; clear_and_dump_items(); stat_task->length_seconds = 0; @@ -1196,9 +1191,9 @@ static void start_stop_decoders(void) btr_log_tree(sl->receiver_node->btrn, LL_NOTICE); } -static void status_pre_select(struct sched *s, struct task *t) +static void status_pre_select(struct sched *s, void *context) { - struct status_task *st = task_context(t); + struct status_task *st = context; int i, ret, cafn = stat_task->current_audio_format_num; if (must_start_decoder()) @@ -1228,9 +1223,9 @@ min_delay: } /* restart the client task if necessary */ -static int status_post_select(struct sched *s, struct task *t) +static int status_post_select(struct sched *s, void *context) { - struct status_task *st = task_context(t); + struct status_task *st = context; if (audiod_status == AUDIOD_OFF) { if (!st->ct)