- stdout_set_defaults(sot);
- sot->buf = fc->outbuf;
- sot->loaded = fc->out_loaded;
- sot->input_error = &fc->task.error;
+ fn = fns[i] = para_calloc(sizeof(*fn));
+ ret = check_filter_arg(fa, &fn->conf);
+ if (ret < 0) {
+ free(fn);
+ goto out_cleanup;
+ }
+ fn->filter_num = ret;
+ f = filter_get(fn->filter_num);
+ PARA_DEBUG_LOG("filter #%d: %s\n", i, f->name);
+ fn->btrn = btr_new_node(&(struct btr_node_description)
+ EMBRACE(.name = f->name, .parent = parent,
+ .handler = f->execute, .context = fn));
+ ti.name = f->name;
+ ti.pre_select = f->pre_select;
+ ti.post_select = f->post_select;
+ ti.context = fn;
+ f->open(fn);
+ fn->task = task_register(&ti, &s);
+ parent = fn->btrn;
+ }
+ sot->btrn = btr_new_node(&(struct btr_node_description)
+ EMBRACE(.name = "stdout", .parent = parent));
+ stdout_task_register(sot, &s);