+ fn->filter_num = ret;
+ f = filters + fn->filter_num;
+ sprintf(fn->task.status, "%s", f->name);
+ 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));
+ fn->task.pre_select = f->pre_select;
+ fn->task.post_select = f->post_select;
+ f->open(fn);
+ register_task(&fn->task);
+ parent = fn->btrn;
+ }
+ sot->btrn = btr_new_node(&(struct btr_node_description)
+ EMBRACE(.name = "stdout", .parent = parent));
+ stdout_set_defaults(sot);
+ register_task(&sot->task);
+
+ s.default_timeout.tv_sec = 1;
+ s.default_timeout.tv_usec = 0;
+ btr_log_tree(sit->btrn, LL_INFO);
+ ret = schedule(&s);
+out_cleanup:
+ for (i--; i >= 0; i--) {
+ struct filter_node *fn = fns[i];
+
+ f = filters + fn->filter_num;
+ if (f->close)
+ f->close(fn);
+ btr_free_node(fn->btrn);
+ free(fn->conf);
+ free(fn);