Commit 8d918817 authored by Davide Ciminaghi's avatar Davide Ciminaghi Committed by Alessandro Rubini

conf: add "announce-interval" option.

This is equivalent to the -n command line option, which will be removed.
Signed-off-by: Davide Ciminaghi's avatarDavide Ciminaghi <ciminaghi@gnudd.com>
parent b0857826
......@@ -215,6 +215,21 @@ static int f_domain(int lineno, struct pp_globals *ppg, union pp_cfg_arg *arg)
return 0;
}
static int f_announce_intvl(int lineno, struct pp_globals *ppg,
union pp_cfg_arg *arg)
{
int i = arg->i;
CHECK_PPI(0);
if (i < 0 || i > 4) {
i = i < 0 ? 0 : 4;
pp_printf("config line %i: announce interval out of range: %i, "
"forced to %i\n", lineno, arg->i, i);
}
GOPTS(ppg)->announce_intvl = i;
return 0;
}
/* These are the tables for the parser */
static struct pp_argname arg_proto[] = {
{"raw", PPSI_PROTO_RAW},
......@@ -248,6 +263,7 @@ static struct pp_argline pp_global_arglines[] = {
{ f_servo_pi, "servo-pi", ARG_INT2},
{ f_latency, "latency", ARG_INT2},
{ f_domain, "domain-number", ARG_INT},
{ f_announce_intvl, "announce-interval", ARG_INT},
{}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment