]> git.tue.mpg.de Git - paraslash.git/commitdiff
filter_chain: Don't return eof too early
authorAndre <maan@p133.(none)>
Sun, 4 Jun 2006 19:52:00 +0000 (21:52 +0200)
committerAndre <maan@p133.(none)>
Sun, 4 Jun 2006 19:52:00 +0000 (21:52 +0200)
The current code may miss to transform the remaining buffer if the
receiver has already deactivated its task. Check for the number of
loaded bytes in the input buffer of the filter chain and return eof
only if nothing is loaded.

filter_chain.c

index 4114ca7743e4987386d6a31bd4cf11809eb9327f..2d82a22c1c890865fa5d5c5c541b133872ed2471 100644 (file)
@@ -124,7 +124,7 @@ void filter_pre_select(__a_unused struct sched *s, struct task *t)
        t->ret = -E_FC_EOF;
        if (fc->output_eof && *fc->output_eof)
                goto err_out;
-       if (fc->input_eof && *fc->input_eof)
+       if (fc->input_eof && *fc->input_eof && !*fc->in_loaded)
                goto err_out;
 again:
        ib = fc->inbuf;