X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=audiod.c;h=ccb233180e750b5077ba2cda6d2f622fd2cbad9b;hb=f51c95fa0edaaf651387456e716899433a0c579c;hp=9b79121b3aa16f51662b9e7e2649e097f81b5a26;hpb=7c11e1acf8efc93b36fcae77c3f0ce04ae491c23;p=paraslash.git diff --git a/audiod.c b/audiod.c index 9b79121b..ccb23318 100644 --- a/audiod.c +++ b/audiod.c @@ -104,18 +104,6 @@ struct command_task { struct task task; }; -/** - * task for signal handling - */ -struct signal_task { - /** the signal pipe */ - int fd; - /** the number of the most recent signal */ - int signum; - /** the associated task structure */ - struct task task; -}; - /** iterate over all supported audio formats */ #define FOR_EACH_AUDIO_FORMAT(af) for (af = 0; af < NUM_AUDIO_FORMATS; af++) @@ -497,7 +485,7 @@ out: return count; } -static void check_stat_line(char *line) +static int check_stat_line(char *line, __a_unused void *data) { int itemnum; size_t ilen = 0; @@ -506,14 +494,14 @@ static void check_stat_line(char *line) // PARA_INFO_LOG("line: %s\n", line); if (!line) - return; + return 1; itemnum = stat_line_valid(line); if (itemnum < 0) { PARA_WARNING_LOG("invalid status line: %s\n", line); - return; + return 1; } if (stat_task->clock_diff_count && itemnum != SI_CURRENT_TIME) - return; + return 1; tmp = make_message("%s\n", line); stat_client_write(tmp, itemnum); free(tmp); @@ -557,6 +545,7 @@ static void check_stat_line(char *line) stat_task->clock_diff_count--; break; } + return 1; } static void try_to_close_slot(int slot_num) @@ -1068,7 +1057,7 @@ static void status_post_select(__a_unused struct sched *s, struct task *t) return; } bytes_left = for_each_line(st->pcd->buf, st->pcd->loaded, - &check_stat_line); + &check_stat_line, NULL); if (st->pcd->loaded != bytes_left) { st->last_status_read = *now; st->pcd->loaded = bytes_left;