X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=prebuffer_filter.c;h=0759d678bc51ca90284108e3a5d5bc25a4c3fc4a;hp=5a849868e0ec2998009512e2e1f2d8e7dde43539;hb=484e75562df55dca31ffcb9e5b05a490b4a3d3a1;hpb=107d4619b3a6a8bdc1a85c8021cb1951244e7626 diff --git a/prebuffer_filter.c b/prebuffer_filter.c index 5a849868..0759d678 100644 --- a/prebuffer_filter.c +++ b/prebuffer_filter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2012 Andre Noll + * Copyright (C) 2009-2013 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -37,7 +37,6 @@ static void prebuffer_pre_select(struct sched *s, struct task *t) struct prebuffer_filter_args_info *conf = ppd->conf; struct timeval diff; - t->error = 0; if (iqs == 0) return; if (ppd->barrier.tv_sec == 0) { @@ -57,7 +56,7 @@ static void prebuffer_close(struct filter_node *fn) free(fn->private_data); } -static void prebuffer_post_select(__a_unused struct sched *s, struct task *t) +static int prebuffer_post_select(__a_unused struct sched *s, struct task *t) { struct filter_node *fn = container_of(t, struct filter_node, task); struct btr_node *btrn = fn->btrn; @@ -65,15 +64,14 @@ static void prebuffer_post_select(__a_unused struct sched *s, struct task *t) struct private_prebuffer_data *ppd = fn->private_data; struct prebuffer_filter_args_info *conf = ppd->conf; - t->error = 0; if (ppd->barrier.tv_sec == 0) - return; + return 0; if (tv_diff(now, &ppd->barrier, NULL) < 0) - return; + return 0; if (iqs < conf->size_arg) - return; - btr_splice_out_node(btrn); - t->error = -E_PREBUFFER_SUCCESS; + return 0; + btr_splice_out_node(fn->btrn); + return -E_PREBUFFER_SUCCESS; } static int prebuffer_parse_config(int argc, char **argv, void **config)