#include <regex.h>
#include <sys/types.h>
#include <dirent.h>
+#include <stdbool.h>
#include "para.h"
#include "list.h"
#include "string.h"
#include "error.h"
#include "stdout.h"
+#include "buffer_tree.h"
/** The gengetopt args info struct. */
static struct recv_args_info conf;
}
r = &receivers[receiver_num];
rn.receiver = r;
+ rn.btrn = btr_new_node("receiver", NULL, NULL, NULL);
ret = r->open(&rn);
if (ret < 0)
goto out;
r_opened = 1;
+ sot.btrn = btr_new_node("stdout", rn.btrn, NULL, NULL);
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;
out:
if (r_opened)
r->close(&rn);
- if (r)
- r->shutdown();
+ btr_free_node(rn.btrn);
+ btr_free_node(sot.btrn);
+ free(rn.conf);
if (ret < 0)
PARA_ERROR_LOG("%s\n", para_strerror(-ret));
return ret < 0? EXIT_FAILURE : EXIT_SUCCESS;