Added blocktime filter option and optimized code.

This commit is contained in:
Christian Deacon
2020-05-07 13:18:43 +00:00
parent f8730a511c
commit d17f5a4f54
5 changed files with 385 additions and 328 deletions

View File

@@ -278,6 +278,18 @@ int ReadConfig(struct config_map *cfg)
cfg->filters[i].do_bps = 1;
}
// Block time (default 1).
int blocktime;
if (config_setting_lookup_int(filter, "blocktime", &blocktime))
{
cfg->filters[i].blockTime = blocktime;
}
else
{
cfg->filters[i].blockTime = 1;
}
// Payload match.
const char *payload;