HTTP/3: replaced macros with values.

This commit is contained in:
Roman Arutyunyan 2021-08-04 17:35:11 +03:00
parent dab9163a95
commit af83b3c32c
2 changed files with 4 additions and 13 deletions

View File

@ -50,11 +50,6 @@
#define NGX_HTTP_V3_STREAM_SERVER_DECODER 5 #define NGX_HTTP_V3_STREAM_SERVER_DECODER 5
#define NGX_HTTP_V3_MAX_KNOWN_STREAM 6 #define NGX_HTTP_V3_MAX_KNOWN_STREAM 6
#define NGX_HTTP_V3_DEFAULT_MAX_TABLE_CAPACITY 16384
#define NGX_HTTP_V3_DEFAULT_MAX_BLOCKED_STREAMS 16
#define NGX_HTTP_V3_DEFAULT_MAX_CONCURRENT_PUSHES 10
#define NGX_HTTP_V3_DEFAULT_MAX_UNI_STREAMS 3
/* HTTP/3 errors */ /* HTTP/3 errors */
#define NGX_HTTP_V3_ERR_NO_ERROR 0x100 #define NGX_HTTP_V3_ERR_NO_ERROR 0x100
#define NGX_HTTP_V3_ERR_GENERAL_PROTOCOL_ERROR 0x101 #define NGX_HTTP_V3_ERR_GENERAL_PROTOCOL_ERROR 0x101

View File

@ -124,20 +124,16 @@ ngx_http_v3_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_http_v3_srv_conf_t *conf = child; ngx_http_v3_srv_conf_t *conf = child;
ngx_conf_merge_size_value(conf->max_table_capacity, ngx_conf_merge_size_value(conf->max_table_capacity,
prev->max_table_capacity, prev->max_table_capacity, 16384);
NGX_HTTP_V3_DEFAULT_MAX_TABLE_CAPACITY);
ngx_conf_merge_uint_value(conf->max_blocked_streams, ngx_conf_merge_uint_value(conf->max_blocked_streams,
prev->max_blocked_streams, prev->max_blocked_streams, 16);
NGX_HTTP_V3_DEFAULT_MAX_BLOCKED_STREAMS);
ngx_conf_merge_uint_value(conf->max_concurrent_pushes, ngx_conf_merge_uint_value(conf->max_concurrent_pushes,
prev->max_concurrent_pushes, prev->max_concurrent_pushes, 10);
NGX_HTTP_V3_DEFAULT_MAX_CONCURRENT_PUSHES);
ngx_conf_merge_uint_value(conf->max_uni_streams, ngx_conf_merge_uint_value(conf->max_uni_streams,
prev->max_uni_streams, prev->max_uni_streams, 3);
NGX_HTTP_V3_DEFAULT_MAX_UNI_STREAMS);
return NGX_CONF_OK; return NGX_CONF_OK;
} }