#define PCLI_F_PROMPT 0x10000
#define PCLI_F_PAYLOAD 0x20000
+#define PCLI_F_RELOAD 0x40000 /* this is the "reload" stream, quits after displaying reload status */
/* error types reported on the streams for more accurate reporting.
if ((s->pcli_flags & ACCESS_LVL_MASK) == ACCESS_LVL_NONE)
s->pcli_flags |= strm_li(s)->bind_conf->level & ACCESS_LVL_MASK;
+ /* stream that comes from the reload listener only responses the reload
+ * status and quits */
+ if (!(s->pcli_flags & PCLI_F_RELOAD)
+ && strm_li(s)->bind_conf == mcli_reload_bind_conf)
+ goto send_status;
+
+
read_again:
/* if the channel is closed for read, we won't receive any more data
from the client, but we don't want to forward this close to the
b_putblk(&req->buf, "help\n", 5);
goto read_again;
+send_status:
+ s->pcli_flags |= PCLI_F_RELOAD;
+ /* dont' use ci_putblk here because SHUTW could have been sent */
+ b_reset(&req->buf);
+ b_putblk(&req->buf, "_loadstatus;quit\n", 17);
+ goto read_again;
+
missing_data:
if (req->flags & CF_SHUTR) {
/* There is no more request or a only a partial one and we