mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-17 00:44:33 +00: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,36 +64,44 @@ 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);
|
||||
appctx_wakeup(appctx);
|
||||
}
|
||||
|
||||
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);
|
||||
appctx_wakeup(appctx);
|
||||
}
|
||||
|
||||
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);
|
||||
appctx_wakeup(appctx);
|
||||
}
|
||||
|
||||
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);
|
||||
appctx_wakeup(appctx);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user