mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-11 09:37:20 +02:00
MEDIUM: channel: add a new flag "CF_ISRESP" for the response channel
This flag designates the response channel. This will be used to know what channel we're seeing and finding our way back to the session.
This commit is contained in:
parent
73796535a9
commit
ef573c0f22
@ -117,7 +117,8 @@
|
|||||||
#define CF_NEVER_WAIT 0x08000000 /* never wait for sending data (permanent) */
|
#define CF_NEVER_WAIT 0x08000000 /* never wait for sending data (permanent) */
|
||||||
|
|
||||||
#define CF_WAKE_ONCE 0x10000000 /* pretend there is activity on this channel (one-shoot) */
|
#define CF_WAKE_ONCE 0x10000000 /* pretend there is activity on this channel (one-shoot) */
|
||||||
/* unused: 0x20000000, 0x40000000, 0x80000000 */
|
/* unused: 0x20000000, 0x40000000 */
|
||||||
|
#define CF_ISRESP 0x80000000 /* 0 = request channel, 1 = response channel */
|
||||||
|
|
||||||
/* Masks which define input events for stream analysers */
|
/* Masks which define input events for stream analysers */
|
||||||
#define CF_MASK_ANALYSER (CF_READ_ATTACHED|CF_READ_ACTIVITY|CF_READ_TIMEOUT|CF_ANA_TIMEOUT|CF_WRITE_ACTIVITY|CF_WAKE_ONCE)
|
#define CF_MASK_ANALYSER (CF_READ_ATTACHED|CF_READ_ACTIVITY|CF_READ_TIMEOUT|CF_ANA_TIMEOUT|CF_WRITE_ACTIVITY|CF_WAKE_ONCE)
|
||||||
|
@ -1908,6 +1908,7 @@ __LJMP static int hlua_socket_new(lua_State *L)
|
|||||||
*/
|
*/
|
||||||
channel_init(&socket->s->req);
|
channel_init(&socket->s->req);
|
||||||
channel_init(&socket->s->res);
|
channel_init(&socket->s->res);
|
||||||
|
socket->s->res.flags |= CF_ISRESP;
|
||||||
|
|
||||||
socket->s->req.prod = &socket->s->si[0];
|
socket->s->req.prod = &socket->s->si[0];
|
||||||
socket->s->req.cons = &socket->s->si[1];
|
socket->s->req.cons = &socket->s->si[1];
|
||||||
|
@ -1256,6 +1256,8 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio
|
|||||||
s->req.wto = s->be->timeout.server;
|
s->req.wto = s->be->timeout.server;
|
||||||
|
|
||||||
channel_init(&s->res);
|
channel_init(&s->res);
|
||||||
|
s->res.flags |= CF_ISRESP;
|
||||||
|
|
||||||
s->res.prod = &s->si[1];
|
s->res.prod = &s->si[1];
|
||||||
s->res.cons = &s->si[0];
|
s->res.cons = &s->si[0];
|
||||||
|
|
||||||
|
@ -502,6 +502,8 @@ int session_complete(struct session *s)
|
|||||||
s->req.analyse_exp = TICK_ETERNITY;
|
s->req.analyse_exp = TICK_ETERNITY;
|
||||||
|
|
||||||
channel_init(&s->res);
|
channel_init(&s->res);
|
||||||
|
s->res.flags |= CF_ISRESP;
|
||||||
|
|
||||||
s->res.prod = &s->si[1];
|
s->res.prod = &s->si[1];
|
||||||
s->res.cons = &s->si[0];
|
s->res.cons = &s->si[0];
|
||||||
s->res.analysers = 0;
|
s->res.analysers = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user