From f6e2cbd7877d40f6eff2ea4ea09a131022a01764 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 31 Mar 2013 13:14:08 +0000 Subject: [PATCH] compress: Switch to the alternative post select method. --- compress_filter.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compress_filter.c b/compress_filter.c index 04377b75..85c365ca 100644 --- a/compress_filter.c +++ b/compress_filter.c @@ -41,7 +41,7 @@ static void compress_close(struct filter_node *fn) free(fn->private_data); } -static void compress_post_select(__a_unused struct sched *s, struct task *t) +static int compress_post_select(__a_unused struct sched *s, struct task *t) { struct filter_node *fn = container_of(t, struct filter_node, task); struct private_compress_data *pcd = fn->private_data; @@ -56,12 +56,11 @@ static void compress_post_select(__a_unused struct sched *s, struct task *t) //inplace = false; next_buffer: - t->error = 0; ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL); if (ret < 0) goto err; if (ret == 0) - return; + return 0; btr_merge(btrn, fn->min_iqs); length = btr_next_buffer(btrn, &inbuf) & ~(size_t)1; if (length == 0) { /* eof and 1 byte available */ @@ -108,8 +107,8 @@ next_buffer: goto next_buffer; err: assert(ret < 0); - t->error = ret; btr_remove_node(&fn->btrn); + return ret; } /** TODO: Add sanity checks */ @@ -151,7 +150,8 @@ void compress_filter_init(struct filter *f) f->open = compress_open; f->close = compress_close; f->pre_select = generic_filter_pre_select; - f->post_select = compress_post_select; + f->new_post_select = compress_post_select; + f->post_select = NULL; f->parse_config = compress_parse_config; f->free_config = compress_free_config; f->help = (struct ggo_help) { -- 2.39.2