mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-24 20:31:00 +01:00
CLEANUP: httpclient: do not use the appctx.ctx anymore
The httpclient already uses its own pointer and only used to store this single pointer into the appctx.ctx field. Let's just move it to the svcctx and remove this entry from the appctx union.
This commit is contained in:
parent
89a7c41e24
commit
1eea6657fb
@ -135,16 +135,6 @@ struct appctx {
|
|||||||
unsigned int unused:31;
|
unsigned int unused:31;
|
||||||
struct shared_block *next; /* The next block of data to be sent for this cache entry. */
|
struct shared_block *next; /* The next block of data to be sent for this cache entry. */
|
||||||
} cache;
|
} cache;
|
||||||
/* all entries below are used by various CLI commands, please
|
|
||||||
* keep the grouped together and avoid adding new ones.
|
|
||||||
*/
|
|
||||||
struct {
|
|
||||||
struct httpclient *ptr;
|
|
||||||
} httpclient;
|
|
||||||
|
|
||||||
/* NOTE: please add regular applet contexts (ie: not
|
|
||||||
* CLI-specific ones) above, before "cli".
|
|
||||||
*/
|
|
||||||
} ctx; /* context-specific variables used by any applet */
|
} ctx; /* context-specific variables used by any applet */
|
||||||
}; /* end of anon union */
|
}; /* end of anon union */
|
||||||
};
|
};
|
||||||
|
|||||||
@ -639,7 +639,7 @@ struct appctx *httpclient_start(struct httpclient *hc)
|
|||||||
|
|
||||||
hc->appctx = appctx;
|
hc->appctx = appctx;
|
||||||
hc->flags |= HTTPCLIENT_FS_STARTED;
|
hc->flags |= HTTPCLIENT_FS_STARTED;
|
||||||
appctx->ctx.httpclient.ptr = hc;
|
appctx->svcctx = hc;
|
||||||
|
|
||||||
/* The request was transferred when the stream was created. So switch
|
/* The request was transferred when the stream was created. So switch
|
||||||
* directly to REQ_BODY or RES_STLINE state
|
* directly to REQ_BODY or RES_STLINE state
|
||||||
@ -738,7 +738,7 @@ err:
|
|||||||
|
|
||||||
static void httpclient_applet_io_handler(struct appctx *appctx)
|
static void httpclient_applet_io_handler(struct appctx *appctx)
|
||||||
{
|
{
|
||||||
struct httpclient *hc = appctx->ctx.httpclient.ptr;
|
struct httpclient *hc = appctx->svcctx;
|
||||||
struct conn_stream *cs = appctx->owner;
|
struct conn_stream *cs = appctx->owner;
|
||||||
struct stream *s = __cs_strm(cs);
|
struct stream *s = __cs_strm(cs);
|
||||||
struct channel *req = &s->req;
|
struct channel *req = &s->req;
|
||||||
@ -1043,7 +1043,7 @@ end:
|
|||||||
|
|
||||||
static void httpclient_applet_release(struct appctx *appctx)
|
static void httpclient_applet_release(struct appctx *appctx)
|
||||||
{
|
{
|
||||||
struct httpclient *hc = appctx->ctx.httpclient.ptr;
|
struct httpclient *hc = appctx->svcctx;
|
||||||
|
|
||||||
/* mark the httpclient as ended */
|
/* mark the httpclient as ended */
|
||||||
hc->flags |= HTTPCLIENT_FS_ENDED;
|
hc->flags |= HTTPCLIENT_FS_ENDED;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user