From d0f451312217f8b6733d6780b3c93837f97ac729 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 23 Jul 2018 16:07:26 +0200 Subject: [PATCH] file: implement in/out config sections --- lib/nodes/file.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/nodes/file.c b/lib/nodes/file.c index 95a061020..c614f6ab5 100644 --- a/lib/nodes/file.c +++ b/lib/nodes/file.c @@ -90,14 +90,16 @@ int file_parse(struct node *n, json_t *cfg) f->epoch_mode = FILE_EPOCH_DIRECT; f->flush = 0; - ret = json_unpack_ex(cfg, &err, 0, "{ s: s, s?: b, s?: s, s?: F, s?: s, s?: F, s?: s }", + ret = json_unpack_ex(cfg, &err, 0, "{ s: s, s?: s, s: { s?: s, s?: F, s?: s, s?: F }, s: { s?: b }", "uri", &uri_tmpl, - "flush", &f->flush, - "eof", &eof, - "rate", &f->rate, - "epoch_mode", &epoch_mode, - "epoch", &epoch_flt, - "format", &format + "format", &format, + "in", + "eof", &eof, + "rate", &f->rate, + "epoch_mode", &epoch_mode, + "epoch", &epoch_flt, + "out", + "flush", &f->flush ); if (ret) jerror(&err, "Failed to parse configuration of node %s", node_name(n));