]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - http_recv.c
Introduce afh_get_afhi_txt().
[paraslash.git] / http_recv.c
index e6031e752bf89bfd194d118af42e0914ccb5d989..c19facf70a39b1503deaea28008fc4b7a8b73f97 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2011 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2012 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -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;
@@ -95,7 +97,7 @@ static void http_recv_post_select(struct sched *s, struct task *t)
                        return;
                rq = make_request_msg();
                PARA_INFO_LOG("sending http request\n");
-               ret = send_va_buffer(rn->fd, "%s", rq);
+               ret = write_va_buffer(rn->fd, "%s", rq);
                free(rq);
                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;
 }
 
@@ -141,7 +143,7 @@ static void http_recv_close(struct receiver_node *rn)
 
 static void *http_recv_parse_config(int argc, char **argv)
 {
-       struct http_recv_args_info *tmp = para_calloc(sizeof(struct http_recv_args_info));
+       struct http_recv_args_info *tmp = para_calloc(sizeof(*tmp));
 
        if (!http_recv_cmdline_parser(argc, argv, tmp))
                return tmp;