]> git.tue.mpg.de Git - paraslash.git/commitdiff
Make writers remove btr node on errors.
authorAndre Noll <maan@systemlinux.org>
Wed, 13 Jan 2010 20:44:35 +0000 (21:44 +0100)
committerAndre Noll <maan@systemlinux.org>
Wed, 13 Jan 2010 20:44:35 +0000 (21:44 +0100)
This is what receivers/filters do as well.

alsa_write.c
file_write.c
oss_write.c

index 11fc58a45608f73d4aa4c16c617a6f65e08d0476..75fe6fae90bb6282b199ef3a659576ad152f0c42 100644 (file)
@@ -364,6 +364,7 @@ again:
        ret = -E_ALSA_WRITE;
 err:
        assert(ret < 0);
+       btr_remove_node(btrn);
        t->error = ret;
 }
 
index 7a24b3ac6b78e9d56b1f194c0479c3584cabbfb3..f7214306b5eafc1af5b7975262646ab3b6911967 100644 (file)
@@ -167,6 +167,7 @@ static void file_write_post_select_btr(__a_unused struct sched *s,
 err:
        assert(ret < 0);
        t->error = ret;
+       btr_remove_node(btrn);
 }
 
 __malloc static void *file_write_parse_config(const char *options)
index 4e5f9b5626c2400f310647cf8805e141f98e983d..c1717eb868cf6757e0aa447e9d6353273a47d89e 100644 (file)
@@ -249,6 +249,8 @@ static void oss_post_select_btr(__a_unused struct sched *s,
        ret = 0;
 out:
        t->error = ret;
+       if (ret < 0)
+               btr_remove_node(btrn);
 }
 
 static int oss_open(struct writer_node *wn)