]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - http_recv.c
client: Remove sb-compatibility code.
[paraslash.git] / http_recv.c
index b4bf1530d811fefb04c4f5b107e752e45d8e9048..a913d3a2aaf42850b190f0ad5943db52e2902fd4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2012 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2013 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
 #include "list.h"
 #include "sched.h"
 #include "ggo.h"
+#include "buffer_tree.h"
 #include "recv.h"
 #include "http_recv.cmdline.h"
 #include "net.h"
 #include "string.h"
 #include "fd.h"
-#include "buffer_tree.h"
 
 /**
  * the possible states of a http receiver node
@@ -83,7 +83,9 @@ static void http_recv_post_select(struct sched *s, struct task *t)
        struct iovec iov[2];
        size_t num_bytes;
 
-       t->error = 0;
+       ret = task_get_notification(t);
+       if (ret < 0)
+               goto out;
        ret = btr_node_status(btrn, 0, BTR_NT_ROOT);
        if (ret < 0)
                goto out;
@@ -128,7 +130,7 @@ static void http_recv_post_select(struct sched *s, struct task *t)
 out:
        if (ret >= 0)
                return;
-       btr_remove_node(rn->btrn);
+       btr_remove_node(&rn->btrn);
        t->error = ret;
 }