From: Andre Noll Date: Wed, 13 Jan 2010 20:44:35 +0000 (+0100) Subject: Make writers remove btr node on errors. X-Git-Tag: v0.4.2~113 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=49c897ce4cffb9ab355540043cd85d22d9a78299;p=paraslash.git Make writers remove btr node on errors. This is what receivers/filters do as well. --- diff --git a/alsa_write.c b/alsa_write.c index 11fc58a4..75fe6fae 100644 --- a/alsa_write.c +++ b/alsa_write.c @@ -364,6 +364,7 @@ again: ret = -E_ALSA_WRITE; err: assert(ret < 0); + btr_remove_node(btrn); t->error = ret; } diff --git a/file_write.c b/file_write.c index 7a24b3ac..f7214306 100644 --- a/file_write.c +++ b/file_write.c @@ -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) diff --git a/oss_write.c b/oss_write.c index 4e5f9b56..c1717eb8 100644 --- a/oss_write.c +++ b/oss_write.c @@ -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)