diff options
author | Roman Arutyunyan <arut@nginx.com> | 2021-04-30 19:10:11 +0300 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2021-04-30 19:10:11 +0300 |
commit | 82f8734935ef28fbda4450fd88410b7d1f359c62 (patch) | |
tree | 79c508698c815db46c1680b0217dfeddb8d277c6 /src/http/v3/ngx_http_v3_request.c | |
parent | a40fa4aa9640a574cc6413dabada256f837d8cb9 (diff) | |
download | nginx-82f8734935ef28fbda4450fd88410b7d1f359c62.tar.gz nginx-82f8734935ef28fbda4450fd88410b7d1f359c62.zip |
HTTP/3: ngx_http_v3_get_session() macro.
It's used instead of accessing c->quic->parent->data directly. Apart from being
simpler, it allows to change the way session is stored in the future by changing
the macro.
Diffstat (limited to 'src/http/v3/ngx_http_v3_request.c')
-rw-r--r-- | src/http/v3/ngx_http_v3_request.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c index c459efef5..23b827aed 100644 --- a/src/http/v3/ngx_http_v3_request.c +++ b/src/http/v3/ngx_http_v3_request.c @@ -81,7 +81,7 @@ ngx_http_v3_init(ngx_connection_t *c) clcf = ngx_http_get_module_loc_conf(hc->conf_ctx, ngx_http_core_module); - h3c = c->quic->parent->data; + h3c = ngx_http_v3_get_session(c); if (h3c->goaway) { ngx_quic_reset_stream(c, NGX_HTTP_V3_ERR_REQUEST_REJECTED); @@ -188,7 +188,7 @@ ngx_http_v3_cleanup_request(void *data) ngx_http_core_loc_conf_t *clcf; ngx_http_v3_connection_t *h3c; - h3c = c->quic->parent->data; + h3c = ngx_http_v3_get_session(c); if (--h3c->nrequests == 0) { clcf = ngx_http_v3_get_module_loc_conf(c, ngx_http_core_module); |