#include "cli.h"
#include "vsb.h"
#include "cli_common.h"
+#include "heritage.h"
#include "mgt.h"
#include "mgt_cli.h"
#include "mgt_event.h"
xxxassert(i == vsb_len(sb));
vsb_delete(sb);
- i = cli_readres(cli_i, &u, &p, 3.0);
+ i = cli_readres(cli_i, &u, &p, params->cli_timeout);
cli_result(cli, u);
cli_out(cli, "%s", p);
free(p);
return (CLIS_COMMS);
}
- i = cli_readres(cli_i, &u, resp, 5.0);
+ i = cli_readres(cli_i, &u, resp, params->cli_timeout);
if (status != NULL)
*status = u;
return (u == CLIS_OK ? 0 : u);
/*--------------------------------------------------------------------*/
+static void
+tweak_cli_timeout(struct cli *cli, struct parspec *par, const char *arg)
+{
+ (void)par;
+ tweak_generic_timeout(cli, &master.cli_timeout, arg);
+}
+
+/*--------------------------------------------------------------------*/
+
static void
tweak_ping_interval(struct cli *cli, struct parspec *par, const char *arg)
{
"backend response."
EXPERIMENTAL,
"off", "bool" },
+ { "cli_timeout", tweak_cli_timeout,
+ "Timeout for the childs replies to CLI requests from "
+ "the master.\n",
+ "5", "seconds" },
{ "ping_interval", tweak_ping_interval,
"Interval between pings from parent to child.\n"
"Zero will disable pinging entirely, which makes "