#define CF_AUTO_CONNECT 0x00800000 /* consumer may attempt to establish a new connection */
#define CF_DONT_READ 0x01000000 /* disable reading for now */
-#define CF_EXPECT_MORE 0x02000000 /* more data expected to be sent very soon (one-shoot) */
-/* unused 0x04000000 - 0x08000000 */
+/* unused 0x02000000 - 0x08000000 */
#define CF_WAKE_ONCE 0x10000000 /* pretend there is activity on this channel (one-shoot) */
#define CF_FLT_ANALYZE 0x20000000 /* at least one filter is still analyzing this channel */
_(CF_WAKE_WRITE, _(CF_SHUTW, _(CF_SHUTW_NOW, _(CF_AUTO_CLOSE,
_(CF_STREAMER, _(CF_STREAMER_FAST, _(CF_WROTE_DATA,
_(CF_KERN_SPLICING,
- _(CF_AUTO_CONNECT, _(CF_DONT_READ, _(CF_EXPECT_MORE,
+ _(CF_AUTO_CONNECT, _(CF_DONT_READ,
_(CF_WAKE_ONCE, _(CF_FLT_ANALYZE,
- _(CF_EOI, _(CF_ISRESP)))))))))))))))))))));
+ _(CF_EOI, _(CF_ISRESP))))))))))))))))))));
/* epilogue */
_(~0U);
return buf;
SC_FL_RCV_ONCE = 0x00000400, /* Don't loop to receive data. cleared after a sucessful receive */
SC_FL_SND_ASAP = 0x00000800, /* Don't wait for sending. cleared when all data were sent */
SC_FL_SND_NEVERWAIT = 0x00001000, /* Never wait for sending (permanent) */
+ SC_FL_SND_EXP_MORE = 0x00001000, /* More data expected to be sent very soon. cleared when all data were sent */
};
/* This function is used to report flags in debugging tools. Please reflect
_(SC_FL_ISBACK, _(SC_FL_NOLINGER, _(SC_FL_NOHALF,
_(SC_FL_DONT_WAKE, _(SC_FL_INDEP_STR, _(SC_FL_WONT_READ,
_(SC_FL_NEED_BUFF, _(SC_FL_NEED_ROOM,
- _(SC_FL_RCV_ONCE, _(SC_FL_SND_ASAP, _(SC_FL_SND_NEVERWAIT)))))))))));
+ _(SC_FL_RCV_ONCE, _(SC_FL_SND_ASAP, _(SC_FL_SND_NEVERWAIT, _(SC_FL_SND_EXP_MORE))))))))))));
/* epilogue */
_(~0U);
return buf;
msg->msg_state = HTTP_MSG_ENDING;
ending:
- req->flags &= ~CF_EXPECT_MORE; /* no more data are expected */
+ s->scb->flags &= ~SC_FL_SND_EXP_MORE; /* no more data are expected to be send */
/* other states, ENDING...TUNNEL */
if (msg->msg_state >= HTTP_MSG_DONE)
channel_dont_close(req);
/* We know that more data are expected, but we couldn't send more that
- * what we did. So we always set the CF_EXPECT_MORE flag so that the
+ * what we did. So we always set the SC_FL_SND_EXP_MORE flag so that the
* system knows it must not set a PUSH on this first part. Interactive
* modes are already handled by the stream sock layer. We must not do
* this in content-length mode because it could present the MSG_MORE
* additional delay to be observed by the receiver.
*/
if (HAS_REQ_DATA_FILTERS(s))
- req->flags |= CF_EXPECT_MORE;
+ s->scb->flags |= SC_FL_SND_EXP_MORE;
DBG_TRACE_DEVEL("waiting for more data to forward",
STRM_EV_STRM_ANA|STRM_EV_HTTP_ANA, s, txn);
txn->status = 0;
s->logs.logwait = 0;
s->logs.level = 0;
- s->res.flags &= ~CF_EXPECT_MORE; /* speed up sending a previous response */
+ s->scf->flags &= ~SC_FL_SND_EXP_MORE; /* speed up sending a previous response */
http_reply_and_close(s, txn->status, NULL);
DBG_TRACE_DEVEL("leaving by closing K/A connection",
STRM_EV_STRM_ANA|STRM_EV_HTTP_ANA, s, txn);
msg->msg_state = HTTP_MSG_ENDING;
ending:
- res->flags &= ~CF_EXPECT_MORE; /* no more data are expected */
+ s->scf->flags &= ~SC_FL_SND_EXP_MORE; /* no more data are expected to be sent */
/* other states, ENDING...TUNNEL */
if (msg->msg_state >= HTTP_MSG_DONE)
channel_dont_close(res);
/* We know that more data are expected, but we couldn't send more that
- * what we did. So we always set the CF_EXPECT_MORE flag so that the
+ * what we did. So we always set the SC_FL_SND_EXP_MORE flag so that the
* system knows it must not set a PUSH on this first part. Interactive
* modes are already handled by the stream sock layer. We must not do
* this in content-length mode because it could present the MSG_MORE
* additional delay to be observed by the receiver.
*/
if (HAS_RSP_DATA_FILTERS(s))
- res->flags |= CF_EXPECT_MORE;
+ s->scf->flags |= SC_FL_SND_EXP_MORE;
/* the stream handler will take care of timeouts and errors */
DBG_TRACE_DEVEL("waiting for more data to forward",
*/
if (!channel_is_empty(ic) &&
sc_ep_test(sco, SE_FL_WAIT_DATA) &&
- (!(ic->flags & CF_EXPECT_MORE) || c_full(ic) || ci_data(ic) == 0 || ic->pipe)) {
+ (!(sc->flags & SC_FL_SND_EXP_MORE) || c_full(ic) || ci_data(ic) == 0 || ic->pipe)) {
int new_len, last_len;
last_len = co_data(ic);
if ((!(sc->flags & (SC_FL_SND_ASAP|SC_FL_SND_NEVERWAIT)) &&
((oc->to_forward && oc->to_forward != CHN_INFINITE_FORWARD) ||
- (oc->flags & CF_EXPECT_MORE) ||
+ (sc->flags & SC_FL_SND_EXP_MORE) ||
(IS_HTX_STRM(s) &&
(!(oc->flags & (CF_EOI|CF_SHUTR)) && htx_expect_more(htxbuf(&oc->buf)))))) ||
((oc->flags & CF_ISRESP) &&
if (!co_data(oc)) {
/* Always clear both flags once everything has been sent, they're one-shot */
- oc->flags &= ~CF_EXPECT_MORE;
- sc->flags &= ~SC_FL_SND_ASAP;
+ sc->flags &= ~(SC_FL_SND_ASAP|SC_FL_SND_EXP_MORE);
}
/* if some data remain in the buffer, it's only because the
* system buffers are full, we will try next time.