X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=write_common.c;h=5bfba37d9197b7910046fa9efd6685167166164b;hb=d56a8447f418cf9046077e743772a416b6f7b826;hp=fb7f4775111009158cbb2ba4836caddbe6247697;hpb=12123ab5a95a0f31385e9615d36056cb6546aced;p=paraslash.git diff --git a/write_common.c b/write_common.c index fb7f4775..5bfba37d 100644 --- a/write_common.c +++ b/write_common.c @@ -73,18 +73,26 @@ void *check_writer_arg(const char *wa, int *writer_num) return NULL; } +/** + * Open a writer node and register the corresponding task. + * + * \param wn The writer node to open. + * \param parent The parent btr node (the source for the writer node). + * + * The configuration of the writer node stored in \p wn->conf must be + * initialized before this function may be called. + */ void register_writer_node(struct writer_node *wn, struct btr_node *parent) { struct writer *w = writers + wn->writer_num; char *name = make_message("%s writer", writer_names[wn->writer_num]); - int ret; wn->btrn = btr_new_node(&(struct btr_node_description) EMBRACE(.name = name, .parent = parent, .handler = w->execute, .context = wn)); strcpy(wn->task.status, name); free(name); - ret = w->open(wn); + w->open(wn); wn->task.post_select = w->post_select; wn->task.pre_select = w->pre_select; register_task(&wn->task);