Mercurial > hg > nginx-quic
diff src/http/v3/ngx_http_v3_filter_module.c @ 8428:40d710a66aef quic
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.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Fri, 30 Apr 2021 19:10:11 +0300 |
parents | 5cb5b568282b |
children | 67f0eb150047 |
line wrap: on
line diff
--- a/src/http/v3/ngx_http_v3_filter_module.c +++ b/src/http/v3/ngx_http_v3_filter_module.c @@ -783,7 +783,7 @@ ngx_http_v3_push_resource(ngx_http_reque ngx_http_v3_connection_t *h3c; c = r->connection; - h3c = c->quic->parent->data; + h3c = ngx_http_v3_get_session(c); h3scf = ngx_http_get_module_srv_conf(r, ngx_http_v3_module); ngx_log_debug5(NGX_LOG_DEBUG_HTTP, c->log, 0, @@ -858,7 +858,7 @@ ngx_http_v3_create_push_request(ngx_http goto failed; } - h3c = c->quic->parent->data; + h3c = ngx_http_v3_get_session(c); ngx_memcpy(hc, h3c, sizeof(ngx_http_connection_t)); c->data = hc;