MINOR: stream-int: replace si_cant_put() with si_rx_room_{blk,rdy}()
Remaining calls to si_cant_put() were all for lack of room and were
turned to si_rx_room_blk(). A few places where SI_FL_RXBLK_ROOM was
cleared by hand were converted to si_rx_room_rdy().
The now unused si_cant_put() function was removed.
diff --git a/src/cli.c b/src/cli.c
index 6329db1..199d25f 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -590,7 +590,7 @@
* would want to return some info right after parsing.
*/
if (buffer_almost_full(si_ib(si))) {
- si_cant_put(si);
+ si_rx_room_blk(si);
break;
}
@@ -693,7 +693,7 @@
cli_get_severity_output(appctx)) != -1)
appctx->st0 = CLI_ST_PROMPT;
else
- si_cant_put(si);
+ si_rx_room_blk(si);
break;
case CLI_ST_PRINT_FREE: {
const char *msg = appctx->ctx.cli.err;
@@ -706,7 +706,7 @@
appctx->st0 = CLI_ST_PROMPT;
}
else
- si_cant_put(si);
+ si_rx_room_blk(si);
break;
}
case CLI_ST_CALLBACK: /* use custom pointer */
@@ -746,7 +746,7 @@
if (ci_putstr(si_ic(si), prompt) != -1)
appctx->st0 = CLI_ST_GETREQ;
else
- si_cant_put(si);
+ si_rx_room_blk(si);
}
/* If the output functions are still there, it means they require more room. */
@@ -834,7 +834,7 @@
chunk_printf(&trash, "%s\n", *var);
if (ci_putchk(si_ic(si), &trash) == -1) {
- si_cant_put(si);
+ si_rx_room_blk(si);
return 0;
}
if (appctx->st2 == STAT_ST_END)
@@ -951,7 +951,7 @@
chunk_appendf(&trash, "\n");
if (ci_putchk(si_ic(si), &trash) == -1) {
- si_cant_put(si);
+ si_rx_room_blk(si);
return 0;
}
skip:
@@ -1008,7 +1008,7 @@
if (ci_putchk(si_ic(si), &trash) == -1) {
chunk_reset(&trash);
chunk_printf(&trash, "[output too large, cannot dump]\n");
- si_cant_put(si);
+ si_rx_room_blk(si);
}
/* dump complete */
@@ -1030,7 +1030,7 @@
case STAT_ST_INIT:
chunk_printf(&trash, "# socket lvl processes\n");
if (ci_putchk(si_ic(si), &trash) == -1) {
- si_cant_put(si);
+ si_rx_room_blk(si);
return 0;
}
appctx->st2 = STAT_ST_LIST;
@@ -1099,7 +1099,7 @@
}
if (ci_putchk(si_ic(si), &trash) == -1) {
- si_cant_put(si);
+ si_rx_room_blk(si);
return 0;
}
}
@@ -1413,7 +1413,7 @@
}
if (ci_putchk(si_ic(si), &trash) == -1) {
- si_cant_put(si);
+ si_rx_room_blk(si);
return 0;
}