mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-29 06:40:59 +01:00
BUG/MINOR: httpclient/cli: change the appctx test in the callbacks
The callbacks of the CLI httpclient are testing the appctx pointer before doing the appctx_wakeup but was dereferencing the appctx pointer before.
This commit is contained in:
parent
b70203017b
commit
dfc3f8906d
@ -64,8 +64,10 @@ void hc_cli_res_stline_cb(struct httpclient *hc)
|
||||
{
|
||||
struct appctx *appctx = hc->caller;
|
||||
|
||||
if (!appctx)
|
||||
return;
|
||||
|
||||
appctx->ctx.cli.i0 |= HC_CLI_F_RES_STLINE;
|
||||
if (appctx)
|
||||
appctx_wakeup(appctx);
|
||||
}
|
||||
|
||||
@ -73,8 +75,10 @@ void hc_cli_res_headers_cb(struct httpclient *hc)
|
||||
{
|
||||
struct appctx *appctx = hc->caller;
|
||||
|
||||
if (!appctx)
|
||||
return;
|
||||
|
||||
appctx->ctx.cli.i0 |= HC_CLI_F_RES_HDR;
|
||||
if (appctx)
|
||||
appctx_wakeup(appctx);
|
||||
}
|
||||
|
||||
@ -82,8 +86,10 @@ void hc_cli_res_body_cb(struct httpclient *hc)
|
||||
{
|
||||
struct appctx *appctx = hc->caller;
|
||||
|
||||
if (!appctx)
|
||||
return;
|
||||
|
||||
appctx->ctx.cli.i0 |= HC_CLI_F_RES_BODY;
|
||||
if (appctx)
|
||||
appctx_wakeup(appctx);
|
||||
}
|
||||
|
||||
@ -91,8 +97,10 @@ void hc_cli_res_end_cb(struct httpclient *hc)
|
||||
{
|
||||
struct appctx *appctx = hc->caller;
|
||||
|
||||
if (!appctx)
|
||||
return;
|
||||
|
||||
appctx->ctx.cli.i0 |= HC_CLI_F_RES_END;
|
||||
if (appctx)
|
||||
appctx_wakeup(appctx);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user