summaryrefslogtreecommitdiffhomepage
path: root/src/http/v3/ngx_http_v3_streams.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2021-04-30 19:10:11 +0300
committerRoman Arutyunyan <arut@nginx.com>2021-04-30 19:10:11 +0300
commit82f8734935ef28fbda4450fd88410b7d1f359c62 (patch)
tree79c508698c815db46c1680b0217dfeddb8d277c6 /src/http/v3/ngx_http_v3_streams.c
parenta40fa4aa9640a574cc6413dabada256f837d8cb9 (diff)
downloadnginx-82f8734935ef28fbda4450fd88410b7d1f359c62.tar.gz
nginx-82f8734935ef28fbda4450fd88410b7d1f359c62.tar.bz2
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 '')
-rw-r--r--src/http/v3/ngx_http_v3_streams.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/http/v3/ngx_http_v3_streams.c b/src/http/v3/ngx_http_v3_streams.c
index b300dcc01..513738469 100644
--- a/src/http/v3/ngx_http_v3_streams.c
+++ b/src/http/v3/ngx_http_v3_streams.c
@@ -148,7 +148,7 @@ ngx_http_v3_close_uni_stream(ngx_connection_t *c)
ngx_http_v3_uni_stream_t *us;
us = c->data;
- h3c = c->quic->parent->data;
+ h3c = ngx_http_v3_get_session(c);
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http3 close stream");
@@ -178,7 +178,7 @@ ngx_http_v3_read_uni_stream_type(ngx_event_t *rev)
c = rev->data;
us = c->data;
- h3c = c->quic->parent->data;
+ h3c = ngx_http_v3_get_session(c);
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http3 read stream type");
@@ -410,7 +410,7 @@ ngx_http_v3_create_push_stream(ngx_connection_t *c, uint64_t push_id)
goto failed;
}
- h3c = c->quic->parent->data;
+ h3c = ngx_http_v3_get_session(c);
h3c->npushing++;
cln->handler = ngx_http_v3_push_cleanup;
@@ -466,7 +466,7 @@ ngx_http_v3_get_uni_stream(ngx_connection_t *c, ngx_uint_t type)
index = -1;
}
- h3c = c->quic->parent->data;
+ h3c = ngx_http_v3_get_session(c);
if (index >= 0) {
if (h3c->known_streams[index]) {
@@ -525,7 +525,7 @@ ngx_http_v3_send_settings(ngx_connection_t *c)
ngx_http_v3_srv_conf_t *h3scf;
ngx_http_v3_connection_t *h3c;
- h3c = c->quic->parent->data;
+ h3c = ngx_http_v3_get_session(c);
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http3 send settings");
@@ -837,7 +837,7 @@ ngx_http_v3_set_max_push_id(ngx_connection_t *c, uint64_t max_push_id)
{
ngx_http_v3_connection_t *h3c;
- h3c = c->quic->parent->data;
+ h3c = ngx_http_v3_get_session(c);
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
"http3 MAX_PUSH_ID:%uL", max_push_id);
@@ -860,7 +860,7 @@ ngx_http_v3_cancel_push(ngx_connection_t *c, uint64_t push_id)
ngx_http_v3_push_t *push;
ngx_http_v3_connection_t *h3c;
- h3c = c->quic->parent->data;
+ h3c = ngx_http_v3_get_session(c);
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
"http3 CANCEL_PUSH:%uL", push_id);