chunk_appendf(msg, "# contents not dumped due to insufficient privileges\n");
if (bi_putchk(si_ic(si), msg) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
chunk_appendf(msg, "\n");
if (bi_putchk(si_ic(si), msg) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
/* return server's effective weight at the moment */
snprintf(trash.str, trash.size, "%d (initial %d)\n", sv->uweight, sv->iweight);
if (bi_putstr(si_ic(si), trash.str) == -1)
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 1;
}
* would want to return some info right after parsing.
*/
if (buffer_almost_full(si_ib(si))) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
break;
}
if (bi_putstr(si_ic(si), appctx->ctx.cli.msg) != -1)
appctx->st0 = STAT_CLI_PROMPT;
else
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
break;
case STAT_CLI_PRINT_FREE:
if (bi_putstr(si_ic(si), appctx->ctx.cli.err) != -1) {
appctx->st0 = STAT_CLI_PROMPT;
}
else
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
break;
case STAT_CLI_O_INFO:
if (stats_dump_info_to_buffer(si))
if (bi_putstr(si_ic(si), appctx->st1 ? "\n> " : "\n") != -1)
appctx->st0 = STAT_CLI_GETREQ;
else
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
}
/* If the output functions are still there, it means they require more room. */
);
if (bi_putchk(si_ic(si), &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
{
dump_pools_to_trash();
if (bi_putchk(si_ic(si), &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
return 1;
if (appctx->ctx.stats.flags & STAT_FMT_HTML) {
stats_dump_html_px_hdr(si, px, uri);
if (bi_putchk(rep, &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
}
/* print the frontend */
if (stats_dump_fe_stats(si, px)) {
if (bi_putchk(rep, &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
}
/* stats.l has been initialized above */
for (; appctx->ctx.stats.l != &px->conf.listeners; appctx->ctx.stats.l = l->by_fe.n) {
if (buffer_almost_full(rep->buf)) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
/* print the frontend */
if (stats_dump_li_stats(si, px, l, uri ? uri->flags : 0)) {
if (bi_putchk(rep, &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
}
enum srv_stats_colour sv_colour;
if (buffer_almost_full(rep->buf)) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
if (stats_dump_sv_stats(si, px, uri ? uri->flags : 0, sv, sv_state, sv_colour)) {
if (bi_putchk(rep, &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
}
/* print the backend */
if (stats_dump_be_stats(si, px, uri ? uri->flags : 0)) {
if (bi_putchk(rep, &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
}
if (appctx->ctx.stats.flags & STAT_FMT_HTML) {
stats_dump_html_px_end(si, px);
if (bi_putchk(rep, &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
}
stats_dump_csv_header();
if (bi_putchk(rep, &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
if (appctx->ctx.stats.flags & STAT_FMT_HTML) {
stats_dump_html_info(si, uri);
if (bi_putchk(rep, &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
}
/* dump proxies */
while (appctx->ctx.stats.px) {
if (buffer_almost_full(rep->buf)) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
if (appctx->ctx.stats.flags & STAT_FMT_HTML) {
stats_dump_html_end();
if (bi_putchk(rep, &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
}
s->logs.tv_request = now;
if (bi_putchk(si_ic(si), &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
s->logs.tv_request = now;
if (bi_putchk(si_ic(si), &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
si_ic(si)->to_forward = 0;
chunk_printf(&trash, "\r\n000000\r\n");
if (bi_putchk(si_ic(si), &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
si_ic(si)->to_forward = last_fwd;
goto out;
}
if (last_len != data_len) {
chunk_printf(&trash, "\r\n%06x\r\n", (last_len - data_len));
if (bi_putchk(si_ic(si), &trash) == -1)
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
si_ic(si)->total += (last_len - data_len);
si_ib(si)->i += (last_len - data_len);
if (appctx->ctx.stats.flags & STAT_CHUNKED) {
chunk_printf(&trash, "\r\n0\r\n\r\n");
if (bi_putchk(si_ic(si), &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
goto out;
}
}
/* stream changed, no need to go any further */
chunk_appendf(&trash, " *** session terminated while we were watching it ***\n");
if (bi_putchk(si_ic(si), &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
appctx->ctx.sess.uid = 0;
sess->res.buf->size);
if (bi_putchk(si_ic(si), &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
chunk_reset(&trash);
chunk_appendf(&trash, "# id (file) description\n");
if (bi_putchk(si_ic(si), &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
/* let's try again later from this stream. We add ourselves into
* this stream's users so that it can remove us upon termination.
*/
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
/* let's try again later from this stream. We add ourselves into
* this stream's users so that it can remove us upon termination.
*/
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
/* let's try again later from this stream. We add ourselves into
* this stream's users so that it can remove us upon termination.
*/
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
/* let's try again later from this stream. We add ourselves into
* this stream's users so that it can remove us upon termination.
*/
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
LIST_ADDQ(&curr_sess->back_refs, &appctx->ctx.sess.bref.users);
return 0;
}
chunk_appendf(&trash, "Session not found.\n");
if (bi_putchk(si_ic(si), &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
if (bi_putchk(si_ic(si), &trash) == -1) {
/* Socket buffer full. Let's try again later from the same point */
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
if (bi_putchk(si_ic(si), &trash) == -1) {
/* Socket buffer full. Let's try again later from the same point */
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
appctx->ctx.errors.ptr = 0;
chunk_appendf(&trash,
" WARNING! update detected on this snapshot, dump interrupted. Please re-check!\n");
if (bi_putchk(si_ic(si), &trash) == -1) {
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
goto next;
if (bi_putchk(si_ic(si), &trash) == -1) {
/* Socket buffer full. Let's try again later from the same point */
- si->flags |= SI_FL_WAIT_ROOM;
+ si_applet_cant_put(si);
return 0;
}
appctx->ctx.errors.ptr = newptr;