X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audioc.c;h=74fb11cb0622cbab54f5c46ce28cbd5856efffe8;hp=abd763596e8b0039084d502e428d1ddec00ea232;hb=7532dc26edc72f4ec98acd0a62e1b02994c34171;hpb=f652ce6afe7f6fd0e42814505234cbf4321a736e diff --git a/audioc.c b/audioc.c index abd76359..74fb11cb 100644 --- a/audioc.c +++ b/audioc.c @@ -106,7 +106,7 @@ static void audioc_pre_select(struct sched *s, struct task *t) para_fd_set(at->fd, &s->rfds, &s->max_fileno); } -static void audioc_post_select(struct sched *s, struct task *t) +static int audioc_post_select(struct sched *s, struct task *t) { char *buf = NULL; struct audioc_task *at = container_of(t, struct audioc_task, task); @@ -115,7 +115,7 @@ static void audioc_post_select(struct sched *s, struct task *t) if (ret < 0) goto out; if (!FD_ISSET(at->fd, &s->rfds)) - return; + return 0; buf = para_malloc(conf.bufsize_arg); ret = recv_bin_buffer(at->fd, buf, conf.bufsize_arg); PARA_DEBUG_LOG("recv: %d\n", ret); @@ -124,14 +124,14 @@ static void audioc_post_select(struct sched *s, struct task *t) if (ret < 0) goto out; btr_add_output(buf, ret, at->btrn); - return; + return 0; out: if (ret < 0) { free(buf); btr_remove_node(&at->btrn); close(at->fd); } - t->error = ret; + return ret; } static struct audioc_task audioc_task = {