#define ACCESS_MCLI_SEVERITY_STR 0x0200 /* 'set severity-output string' on master CLI */
/* flags for appctx->st1 */
-#define APPCTX_CLI_ST1_PROMPT (1 << 0)
-#define APPCTX_CLI_ST1_PAYLOAD (1 << 1)
-#define APPCTX_CLI_ST1_NOLF (1 << 2)
-#define APPCTX_CLI_ST1_TIMED (1 << 3)
-#define APPCTX_CLI_ST1_LASTCMD (1 << 4)
+#define APPCTX_CLI_ST1_PAYLOAD (1 << 0)
+#define APPCTX_CLI_ST1_NOLF (1 << 1)
+#define APPCTX_CLI_ST1_LASTCMD (1 << 2)
+#define APPCTX_CLI_ST1_INTER (1 << 3) /* interactive mode (i.e. don't close after 1st cmd) */
+#define APPCTX_CLI_ST1_PROMPT (1 << 4) /* display prompt */
+#define APPCTX_CLI_ST1_TIMED (1 << 5) /* display timer in prompt */
#define CLI_PREFIX_KW_NB 5
#define CLI_MAX_MATCHES 5
appctx->cli_ctx.payload = NULL;
appctx->cli_ctx.cmdline = NULL;
appctx->st1 &= ~APPCTX_CLI_ST1_LASTCMD;
- if (appctx->st1 & APPCTX_CLI_ST1_PROMPT) {
+ if (appctx->st1 & APPCTX_CLI_ST1_INTER) {
appctx->st0 = CLI_ST_PARSE_CMDLINE;
applet_will_consume(appctx);
applet_expect_data(appctx);
else if (*args[0] == 'p')
/* prompt */
if (strcmp(args[1], "timed") == 0) {
- appctx->st1 |= APPCTX_CLI_ST1_PROMPT;
+ appctx->st1 |= APPCTX_CLI_ST1_PROMPT | APPCTX_CLI_ST1_INTER;
appctx->st1 ^= APPCTX_CLI_ST1_TIMED;
}
else
- appctx->st1 ^= APPCTX_CLI_ST1_PROMPT;
+ appctx->st1 ^= APPCTX_CLI_ST1_PROMPT | APPCTX_CLI_ST1_INTER;
else if (*args[0] == 'q') {
/* quit */
applet_set_eoi(appctx);