summaryrefslogtreecommitdiffhomepage
path: root/src/http/v3/ngx_http_v3_tables.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2021-05-05 14:53:36 +0300
committerRoman Arutyunyan <arut@nginx.com>2021-05-05 14:53:36 +0300
commit38773a3c1130d34715f1cce24527a10258447354 (patch)
tree21ab82b33f79ae8a9a316eb62c7b8df418ec1877 /src/http/v3/ngx_http_v3_tables.c
parent82f8734935ef28fbda4450fd88410b7d1f359c62 (diff)
downloadnginx-38773a3c1130d34715f1cce24527a10258447354.tar.gz
nginx-38773a3c1130d34715f1cce24527a10258447354.tar.bz2
HTTP/3: reference h3c directly from ngx_http_connection_t.
Previously, an ngx_http_v3_connection_t object was created for HTTP/3 and then assinged to c->data instead of the generic ngx_http_connection_t object. Now a direct reference is added to ngx_http_connection_t, which is less confusing and does not require a flag for http3.
Diffstat (limited to 'src/http/v3/ngx_http_v3_tables.c')
-rw-r--r--src/http/v3/ngx_http_v3_tables.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/http/v3/ngx_http_v3_tables.c b/src/http/v3/ngx_http_v3_tables.c
index c2ce14660..46dcc6734 100644
--- a/src/http/v3/ngx_http_v3_tables.c
+++ b/src/http/v3/ngx_http_v3_tables.c
@@ -251,7 +251,7 @@ ngx_http_v3_set_capacity(ngx_connection_t *c, ngx_uint_t capacity)
"http3 set capacity %ui", capacity);
h3c = ngx_http_v3_get_session(c);
- h3scf = ngx_http_get_module_srv_conf(h3c->hc.conf_ctx, ngx_http_v3_module);
+ h3scf = ngx_http_v3_get_module_srv_conf(c, ngx_http_v3_module);
if (capacity > h3scf->max_table_capacity) {
ngx_log_error(NGX_LOG_INFO, c->log, 0,
@@ -498,7 +498,7 @@ ngx_http_v3_decode_insert_count(ngx_connection_t *c, ngx_uint_t *insert_count)
h3c = ngx_http_v3_get_session(c);
dt = &h3c->table;
- h3scf = ngx_http_get_module_srv_conf(h3c->hc.conf_ctx, ngx_http_v3_module);
+ h3scf = ngx_http_v3_get_module_srv_conf(c, ngx_http_v3_module);
max_entries = h3scf->max_table_capacity / 32;
full_range = 2 * max_entries;
@@ -582,8 +582,7 @@ ngx_http_v3_check_insert_count(ngx_connection_t *c, ngx_uint_t insert_count)
}
if (block->queue.prev == NULL) {
- h3scf = ngx_http_get_module_srv_conf(h3c->hc.conf_ctx,
- ngx_http_v3_module);
+ h3scf = ngx_http_v3_get_module_srv_conf(c, ngx_http_v3_module);
if (h3c->nblocked == h3scf->max_blocked_streams) {
ngx_log_error(NGX_LOG_INFO, c->log, 0,