MINOR: stream-int: rename si_applet_{want|stop|cant}_{get|put}
It doesn't make sense to limit this code to applets, as any stream
interface can use it. Let's rename it by simply dropping the "applet_"
part of the name. No other change was made except updating the comments.
diff --git a/src/cli.c b/src/cli.c
index e20e0c5..85e344d 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -550,7 +550,7 @@
/* Check if the input buffer is avalaible. */
if (res->buf.size == 0) {
- si_applet_cant_put(si);
+ si_cant_put(si);
goto out;
}
@@ -588,7 +588,7 @@
* would want to return some info right after parsing.
*/
if (buffer_almost_full(si_ib(si))) {
- si_applet_cant_put(si);
+ si_cant_put(si);
break;
}
@@ -691,7 +691,7 @@
cli_get_severity_output(appctx)) != -1)
appctx->st0 = CLI_ST_PROMPT;
else
- si_applet_cant_put(si);
+ si_cant_put(si);
break;
case CLI_ST_PRINT_FREE: {
const char *msg = appctx->ctx.cli.err;
@@ -704,7 +704,7 @@
appctx->st0 = CLI_ST_PROMPT;
}
else
- si_applet_cant_put(si);
+ si_cant_put(si);
break;
}
case CLI_ST_CALLBACK: /* use custom pointer */
@@ -744,7 +744,7 @@
if (ci_putstr(si_ic(si), prompt) != -1)
appctx->st0 = CLI_ST_GETREQ;
else
- si_applet_cant_put(si);
+ si_cant_put(si);
}
/* If the output functions are still there, it means they require more room. */
@@ -832,7 +832,7 @@
chunk_printf(&trash, "%s\n", *var);
if (ci_putchk(si_ic(si), &trash) == -1) {
- si_applet_cant_put(si);
+ si_cant_put(si);
return 0;
}
if (appctx->st2 == STAT_ST_END)
@@ -949,7 +949,7 @@
chunk_appendf(&trash, "\n");
if (ci_putchk(si_ic(si), &trash) == -1) {
- si_applet_cant_put(si);
+ si_cant_put(si);
return 0;
}
skip:
@@ -1006,7 +1006,7 @@
if (ci_putchk(si_ic(si), &trash) == -1) {
chunk_reset(&trash);
chunk_printf(&trash, "[output too large, cannot dump]\n");
- si_applet_cant_put(si);
+ si_cant_put(si);
}
/* dump complete */
@@ -1028,7 +1028,7 @@
case STAT_ST_INIT:
chunk_printf(&trash, "# socket lvl processes\n");
if (ci_putchk(si_ic(si), &trash) == -1) {
- si_applet_cant_put(si);
+ si_cant_put(si);
return 0;
}
appctx->st2 = STAT_ST_LIST;
@@ -1097,7 +1097,7 @@
}
if (ci_putchk(si_ic(si), &trash) == -1) {
- si_applet_cant_put(si);
+ si_cant_put(si);
return 0;
}
}
@@ -1411,7 +1411,7 @@
}
if (ci_putchk(si_ic(si), &trash) == -1) {
- si_applet_cant_put(si);
+ si_cant_put(si);
return 0;
}