From: Andre Noll Date: Thu, 13 May 2010 11:08:59 +0000 (+0200) Subject: Merge branch 't/nonblock_api' X-Git-Tag: v0.4.3~25 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=5b15980ce22a3a4244e2440f46eac19eb0ceb3ef;hp=-c Merge branch 't/nonblock_api' --- 5b15980ce22a3a4244e2440f46eac19eb0ceb3ef diff --combined audiod.c index 4a4a2ae7,012f6344..778318ce --- a/audiod.c +++ b/audiod.c @@@ -191,7 -191,7 +191,7 @@@ int get_audio_format_num(const char *na * It has to to take into account that probably the stream was not started at * the beginning of the file, that the clock between the server and the client * host may differ and that playback of the stream was delayed, e.g. because - * the prebuffer filter is used in the filter chain of the given slot. + * the prebuffer filter is used in the filter configuration of the given slot. * * If no writer is active in the given slot, or \a slot_num is negative * (indicating that para_audiod runs in standby mode), an approximation based @@@ -980,19 -980,16 +980,16 @@@ static void signal_pre_select(struct sc para_fd_set(st->fd, &s->rfds, &s->max_fileno); } - static void signal_post_select(struct sched *s, struct task *t) + static void signal_post_select(struct sched *s, __a_unused struct task *t) { - struct signal_task *st = container_of(t, struct signal_task, task); - - if (!FD_ISSET(st->fd, &s->rfds)) - return; + int signum; - st->signum = para_next_signal(); - switch (st->signum) { + signum = para_next_signal(&s->rfds); + switch (signum) { case SIGINT: case SIGTERM: case SIGHUP: - PARA_EMERG_LOG("terminating on signal %d\n", st->signum); + PARA_EMERG_LOG("terminating on signal %d\n", signum); clean_exit(EXIT_FAILURE, "caught deadly signal"); } } @@@ -1023,9 -1020,7 +1020,7 @@@ static void command_post_select(struct last_status_dump = *now; } - if (!FD_ISSET(ct->fd, &s->rfds)) - return; - ret = handle_connect(ct->fd); + ret = handle_connect(ct->fd, &s->rfds); if (ret < 0) PARA_ERROR_LOG("%s\n", para_strerror(-ret)); audiod_status_dump(); diff --combined error.h index d92c9d6e,1c477137..31903062 --- a/error.h +++ b/error.h @@@ -89,7 -89,7 +89,7 @@@ extern const char **para_errlist[] #define WAV_FILTER_ERRORS \ - PARA_ERROR(WAV_BAD_FC, "invalid filter chain configuration"), \ + PARA_ERROR(WAV_BAD_FC, "invalid filter configuration"), \ PARA_ERROR(WAV_EOF, "wav filter: end of file"), \ PARA_ERROR(WAV_SUCCESS, "successfully wrote wav header"), \ @@@ -228,7 -228,6 +228,6 @@@ PARA_ERROR(SENDMSG, "sendmsg() failed"), \ PARA_ERROR(RECVMSG, "recvmsg() failed"), \ PARA_ERROR(SCM_CREDENTIALS, "did not receive SCM credentials"), \ - PARA_ERROR(RECV_PATTERN, "did not receive expected pattern"), \ #define UDP_RECV_ERRORS \ @@@ -374,6 -373,8 +373,8 @@@ #define FD_ERRORS \ PARA_ERROR(FGETS, "fgets error"), \ + PARA_ERROR(EOF, "end of file"), \ + PARA_ERROR(READ_PATTERN, "did not read expected pattern"), \ #define WRITE_ERRORS \