Rename config settings for consistency.
This commit is contained in:
14
src/config.c
14
src/config.c
@@ -159,7 +159,7 @@ int readcfg(struct config *cfg)
|
||||
// Get auto update time.
|
||||
int updatetime;
|
||||
|
||||
if (config_lookup_int(&conf, "updatetime", &updatetime) == CONFIG_TRUE)
|
||||
if (config_lookup_int(&conf, "update_time", &updatetime) == CONFIG_TRUE)
|
||||
{
|
||||
cfg->updatetime = updatetime;
|
||||
}
|
||||
@@ -175,7 +175,7 @@ int readcfg(struct config *cfg)
|
||||
// Get no stats.
|
||||
int nostats;
|
||||
|
||||
if (config_lookup_bool(&conf, "nostats", &nostats) == CONFIG_TRUE)
|
||||
if (config_lookup_bool(&conf, "no_stats", &nostats) == CONFIG_TRUE)
|
||||
{
|
||||
cfg->nostats = nostats;
|
||||
}
|
||||
@@ -230,7 +230,7 @@ int readcfg(struct config *cfg)
|
||||
// Source IP (not required).
|
||||
const char *sip;
|
||||
|
||||
if (config_setting_lookup_string(filter, "srcip", &sip))
|
||||
if (config_setting_lookup_string(filter, "src_ip", &sip))
|
||||
{
|
||||
cfg->filters[i].srcip = inet_addr(sip);
|
||||
}
|
||||
@@ -238,7 +238,7 @@ int readcfg(struct config *cfg)
|
||||
// Destination IP (not required).
|
||||
const char *dip;
|
||||
|
||||
if (config_setting_lookup_string(filter, "dstip", &dip))
|
||||
if (config_setting_lookup_string(filter, "dst_ip", &dip))
|
||||
{
|
||||
cfg->filters[i].dstip = inet_addr(dip);
|
||||
}
|
||||
@@ -246,7 +246,7 @@ int readcfg(struct config *cfg)
|
||||
// Source IP (IPv6) (not required).
|
||||
const char *sip6;
|
||||
|
||||
if (config_setting_lookup_string(filter, "srcip6", &sip6))
|
||||
if (config_setting_lookup_string(filter, "src_ip6", &sip6))
|
||||
{
|
||||
struct in6_addr in;
|
||||
|
||||
@@ -261,7 +261,7 @@ int readcfg(struct config *cfg)
|
||||
// Destination IP (IPv6) (not required).
|
||||
const char *dip6;
|
||||
|
||||
if (config_setting_lookup_string(filter, "dstip6", &dip6))
|
||||
if (config_setting_lookup_string(filter, "dst_ip6", &dip6))
|
||||
{
|
||||
struct in6_addr in;
|
||||
|
||||
@@ -339,7 +339,7 @@ int readcfg(struct config *cfg)
|
||||
// Block time (default 1).
|
||||
long long blocktime;
|
||||
|
||||
if (config_setting_lookup_int64(filter, "blocktime", &blocktime))
|
||||
if (config_setting_lookup_int64(filter, "block_time", &blocktime))
|
||||
{
|
||||
cfg->filters[i].blocktime = blocktime;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user