X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=recv.c;h=5cd64cc7e6058cd7723c9abf847f36a23c8f0a0b;hp=70866a35bb7c96a9157570a140b03eddc9043845;hb=bc8abdf149e4f26d20b5728e270063215da2f2c3;hpb=7c3e4083d6899aff955ed1b2487122b0cbf43392 diff --git a/recv.c b/recv.c index 70866a35..5cd64cc7 100644 --- a/recv.c +++ b/recv.c @@ -60,7 +60,7 @@ static void *parse_config(int argc, char *argv[], int *receiver_num) } /** - * the main function of para_recv + * The main function of para_recv. * * \param argc number of arguments * \param argv vector of arguments @@ -92,22 +92,21 @@ int main(int argc, char *argv[]) } r = &receivers[receiver_num]; rn.receiver = r; - rn.btrn = btr_new_node("receiver", NULL, NULL, NULL); + rn.btrn = btr_new_node(&(struct btr_node_description) + EMBRACE(.name = r->name)); ret = r->open(&rn); if (ret < 0) goto out; r_opened = 1; - sot.btrn = btr_new_node("stdout", rn.btrn, NULL, NULL); + sot.btrn = btr_new_node(&(struct btr_node_description) + EMBRACE(.parent = rn.btrn, .name = "stdout")); stdout_set_defaults(&sot); - sot.bufp = &rn.buf; - sot.loaded = &rn.loaded; - sot.input_error = &rn.task.error; register_task(&sot.task); rn.task.pre_select = r->pre_select; rn.task.post_select = r->post_select; - sprintf(rn.task.status, "receiver node"); + sprintf(rn.task.status, "%s", r->name); register_task(&rn.task); ret = schedule(&s);