]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - stdin.c
[btr] Split btr_del_node() into two functions.
[paraslash.git] / stdin.c
diff --git a/stdin.c b/stdin.c
index c8ee808fcb539611fb1e40cddc9c0c189fa95d50..079865f7ac982bbcdf8103a5418e58a0d05e25b2 100644 (file)
--- a/stdin.c
+++ b/stdin.c
@@ -52,12 +52,6 @@ static void stdin_pre_select_btr(struct sched *s, struct task *t)
 {
        struct stdin_task *sit = container_of(t, struct stdin_task, task);
 
-       if (btr_no_children(sit->btrn)) { /* TODO: defer node deletion to post select */
-               t->error = -E_STDIN_NO_CHILD;
-               btr_del_node(sit->btrn);
-               sit->btrn = NULL;
-               return;
-       }
        t->error = 0;
        if (btr_bytes_pending(sit->btrn) > STDIN_MAX_PENDING)
                sit->check_fd = 0;
@@ -131,8 +125,7 @@ static void stdin_post_select_btr(struct sched *s, struct task *t)
        return;
 err:
        free(buf);
-       btr_del_node(sit->btrn);
-       sit->btrn = NULL;
+       btr_remove_node(sit->btrn);
 }
 
 /**