Mercurial > hg > nginx-quic
diff src/http/v3/ngx_http_v3.h @ 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 | 47a43b011dec |
children | 9ec3e71f8a61 |
line wrap: on
line diff
--- a/src/http/v3/ngx_http_v3.h +++ b/src/http/v3/ngx_http_v3.h @@ -74,6 +74,9 @@ #define NGX_HTTP_V3_ERR_DECODER_STREAM_ERROR 0x202 +#define ngx_http_v3_get_session(c) \ + ((ngx_http_v3_connection_t *) (c)->quic->parent->data) + #define ngx_http_v3_get_module_loc_conf(c, module) \ ngx_http_get_module_loc_conf( \ ((ngx_http_v3_connection_t *) c->quic->parent->data)->hc.conf_ctx, \