diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2024-05-27 12:56:11 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2024-05-27 13:07:13 +0300 |
commit | 186aa6449acbf7bc1536f5ee62f86495218edbbd (patch) | |
tree | 4d9b14b900cfaee3b0c92158140f98d115fea088 /contrib/libs/nghttp2 | |
parent | f41275d5d9059a63659f5017a860ba8a3ceb73a8 (diff) | |
download | ydb-186aa6449acbf7bc1536f5ee62f86495218edbbd.tar.gz |
Update contrib/libs/nghttp2 to 1.62.0
2ea54331c57955c9ee6f88f24b931d4b87f99814
Diffstat (limited to 'contrib/libs/nghttp2')
-rw-r--r-- | contrib/libs/nghttp2/AUTHORS | 2 | ||||
-rw-r--r-- | contrib/libs/nghttp2/README.rst | 14 | ||||
-rw-r--r-- | contrib/libs/nghttp2/config-linux.h | 15 | ||||
-rw-r--r-- | contrib/libs/nghttp2/lib/includes/nghttp2/nghttp2ver.h | 4 | ||||
-rw-r--r-- | contrib/libs/nghttp2/lib/nghttp2_buf.c | 4 | ||||
-rw-r--r-- | contrib/libs/nghttp2/lib/nghttp2_hd.c | 12 | ||||
-rw-r--r-- | contrib/libs/nghttp2/lib/nghttp2_hd_huffman.c | 4 | ||||
-rw-r--r-- | contrib/libs/nghttp2/lib/nghttp2_helper.c | 6 | ||||
-rw-r--r-- | contrib/libs/nghttp2/lib/nghttp2_helper.h | 27 | ||||
-rw-r--r-- | contrib/libs/nghttp2/lib/nghttp2_pq.c | 2 | ||||
-rw-r--r-- | contrib/libs/nghttp2/lib/nghttp2_ratelim.c | 2 | ||||
-rw-r--r-- | contrib/libs/nghttp2/lib/nghttp2_session.c | 47 | ||||
-rw-r--r-- | contrib/libs/nghttp2/lib/nghttp2_stream.c | 2 | ||||
-rw-r--r-- | contrib/libs/nghttp2/lib/nghttp2_submit.c | 4 | ||||
-rw-r--r-- | contrib/libs/nghttp2/ya.make | 4 |
15 files changed, 91 insertions, 58 deletions
diff --git a/contrib/libs/nghttp2/AUTHORS b/contrib/libs/nghttp2/AUTHORS index de4be6d76f..2a361e1acb 100644 --- a/contrib/libs/nghttp2/AUTHORS +++ b/contrib/libs/nghttp2/AUTHORS @@ -20,6 +20,7 @@ Alex Nalivko Alexandr Vlasov Alexandros Konstantinakis-Karmis Alexis La Goutte +Alyssa Ross Amir Livneh Amir Pakdel Anders Bakken @@ -45,6 +46,7 @@ Dave Reisner David Beitey David Korczynski David Weekly +Deel Dimitris Apostolou Dmitri Tikhonov Dmitriy Vetutnev diff --git a/contrib/libs/nghttp2/README.rst b/contrib/libs/nghttp2/README.rst index fc81c03979..b54e85c613 100644 --- a/contrib/libs/nghttp2/README.rst +++ b/contrib/libs/nghttp2/README.rst @@ -127,7 +127,7 @@ following libraries are required: <https://github.com/quictls/openssl/tree/OpenSSL_1_1_1w+quic>`_; or LibreSSL (does not support 0RTT); or aws-lc; or `BoringSSL <https://boringssl.googlesource.com/boringssl/>`_ (commit - fae0964b3d44e94ca2a2d21f86e61dabe683d130) + 6ab7c1482bf4cdc91c87bc512aaf68ffb18975ec) * `ngtcp2 <https://github.com/ngtcp2/ngtcp2>`_ >= 1.4.0 * `nghttp3 <https://github.com/ngtcp2/nghttp3>`_ >= 1.1.0 @@ -149,9 +149,9 @@ requires eBPF program for reloading its configuration and hot swapping its executable. Compiling libnghttp2 C source code requires a C99 compiler. gcc 4.8 -is known to be adequate. In order to compile the C++ source code, gcc ->= 6.0 or clang >= 6.0 is required. C++ source code requires C++14 -language features. +is known to be adequate. In order to compile the C++ source code, +C++20 compliant compiler is required. At least g++ >= 1.12 and +clang++ >= 1.15 are known to work. .. note:: @@ -341,7 +341,7 @@ Build aws-lc: .. code-block:: text - $ git clone --depth 1 -b v1.23.0 https://github.com/aws/aws-lc + $ git clone --depth 1 -b v1.26.0 https://github.com/aws/aws-lc $ cd aws-lc $ cmake -B build -DDISABLE_GO=ON --install-prefix=$PWD/opt $ make -j$(nproc) -C build @@ -352,7 +352,7 @@ Build nghttp3: .. code-block:: text - $ git clone --depth 1 -b v1.2.0 https://github.com/ngtcp2/nghttp3 + $ git clone --depth 1 -b v1.3.0 https://github.com/ngtcp2/nghttp3 $ cd nghttp3 $ git submodule update --init --depth 1 $ autoreconf -i @@ -365,7 +365,7 @@ Build ngtcp2: .. code-block:: text - $ git clone --depth 1 -b v1.4.0 https://github.com/ngtcp2/ngtcp2 + $ git clone --depth 1 -b v1.5.0 https://github.com/ngtcp2/ngtcp2 $ cd ngtcp2 $ git submodule update --init --depth 1 $ autoreconf -i diff --git a/contrib/libs/nghttp2/config-linux.h b/contrib/libs/nghttp2/config-linux.h index a779148e82..dadaee750e 100644 --- a/contrib/libs/nghttp2/config-linux.h +++ b/contrib/libs/nghttp2/config-linux.h @@ -16,8 +16,9 @@ /* Define to 1 if you have the <arpa/inet.h> header file. */ #define HAVE_ARPA_INET_H 1 -/* Define to 1 if you have the std::atomic_* overloads for std::shared_ptr. */ -#define HAVE_ATOMIC_STD_SHARED_PTR 1 +/* Define to 1 if you have the std::atomic<std::shared_ptr<T>> is supported. + */ +/* #undef HAVE_ATOMIC_STD_SHARED_PTR */ /* Define to 1 if you have enum bpf_stats_type in linux/bpf.h. */ /* #undef HAVE_BPF_STATS_TYPE */ @@ -28,8 +29,8 @@ /* Define to 1 if you have the `clock_gettime' function. */ #define HAVE_CLOCK_GETTIME 1 -/* define if the compiler supports basic C++14 syntax */ -#define HAVE_CXX14 1 +/* define if the compiler supports basic C++20 syntax */ +#define HAVE_CXX20 1 /* Define to 1 if you have the declaration of `CLOCK_MONOTONIC', and to 0 if you don't. */ @@ -263,7 +264,7 @@ #define PACKAGE_NAME "nghttp2" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "nghttp2 1.61.0" +#define PACKAGE_STRING "nghttp2 1.62.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "nghttp2" @@ -272,7 +273,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.61.0" +#define PACKAGE_VERSION "1.62.0" /* Define to 1 if all of the C90 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for @@ -371,7 +372,7 @@ /* Version number of package */ -#define VERSION "1.61.0" +#define VERSION "1.62.0" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ diff --git a/contrib/libs/nghttp2/lib/includes/nghttp2/nghttp2ver.h b/contrib/libs/nghttp2/lib/includes/nghttp2/nghttp2ver.h index a21d6a1605..c8a373a120 100644 --- a/contrib/libs/nghttp2/lib/includes/nghttp2/nghttp2ver.h +++ b/contrib/libs/nghttp2/lib/includes/nghttp2/nghttp2ver.h @@ -29,7 +29,7 @@ * @macro * Version number of the nghttp2 library release */ -#define NGHTTP2_VERSION "1.61.0" +#define NGHTTP2_VERSION "1.62.0" /** * @macro @@ -37,6 +37,6 @@ * release. This is a 24 bit number with 8 bits for major number, 8 bits * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203. */ -#define NGHTTP2_VERSION_NUM 0x013d00 +#define NGHTTP2_VERSION_NUM 0x013e00 #endif /* NGHTTP2VER_H */ diff --git a/contrib/libs/nghttp2/lib/nghttp2_buf.c b/contrib/libs/nghttp2/lib/nghttp2_buf.c index 101035f923..15cd674a65 100644 --- a/contrib/libs/nghttp2/lib/nghttp2_buf.c +++ b/contrib/libs/nghttp2/lib/nghttp2_buf.c @@ -61,7 +61,7 @@ int nghttp2_buf_reserve(nghttp2_buf *buf, size_t new_cap, nghttp2_mem *mem) { return 0; } - new_cap = nghttp2_max(new_cap, cap * 2); + new_cap = nghttp2_max_size(new_cap, cap * 2); ptr = nghttp2_mem_realloc(mem, buf->begin, new_cap); if (ptr == NULL) { @@ -343,7 +343,7 @@ int nghttp2_bufs_add(nghttp2_bufs *bufs, const void *data, size_t len) { while (len) { buf = &bufs->cur->buf; - nwrite = nghttp2_min(nghttp2_buf_avail(buf), len); + nwrite = nghttp2_min_size(nghttp2_buf_avail(buf), len); if (nwrite == 0) { rv = bufs_alloc_chain(bufs); if (rv != 0) { diff --git a/contrib/libs/nghttp2/lib/nghttp2_hd.c b/contrib/libs/nghttp2/lib/nghttp2_hd.c index 1b0c71331a..cab6ec8fc7 100644 --- a/contrib/libs/nghttp2/lib/nghttp2_hd.c +++ b/contrib/libs/nghttp2/lib/nghttp2_hd.c @@ -1245,13 +1245,13 @@ static void hd_context_shrink_table_size(nghttp2_hd_context *context, int nghttp2_hd_deflate_change_table_size( nghttp2_hd_deflater *deflater, size_t settings_max_dynamic_table_size) { - size_t next_bufsize = nghttp2_min(settings_max_dynamic_table_size, - deflater->deflate_hd_table_bufsize_max); + size_t next_bufsize = nghttp2_min_size( + settings_max_dynamic_table_size, deflater->deflate_hd_table_bufsize_max); deflater->ctx.hd_table_bufsize_max = next_bufsize; deflater->min_hd_table_bufsize_max = - nghttp2_min(deflater->min_hd_table_bufsize_max, next_bufsize); + nghttp2_min_size(deflater->min_hd_table_bufsize_max, next_bufsize); deflater->notify_table_size_change = 1; @@ -1738,7 +1738,7 @@ static nghttp2_ssize hd_inflate_read_huff(nghttp2_hd_inflater *inflater, static nghttp2_ssize hd_inflate_read(nghttp2_hd_inflater *inflater, nghttp2_buf *buf, const uint8_t *in, const uint8_t *last) { - size_t len = nghttp2_min((size_t)(last - in), inflater->left); + size_t len = nghttp2_min_size((size_t)(last - in), inflater->left); buf->last = nghttp2_cpymem(buf->last, in, len); @@ -1962,8 +1962,8 @@ nghttp2_ssize nghttp2_hd_inflate_hd_nv(nghttp2_hd_inflater *inflater, rfin = 0; rv = hd_inflate_read_len( inflater, &rfin, in, last, 5, - nghttp2_min(inflater->min_hd_table_bufsize_max, - inflater->settings_hd_table_bufsize_max)); + nghttp2_min_size(inflater->min_hd_table_bufsize_max, + inflater->settings_hd_table_bufsize_max)); if (rv < 0) { goto fail; } diff --git a/contrib/libs/nghttp2/lib/nghttp2_hd_huffman.c b/contrib/libs/nghttp2/lib/nghttp2_hd_huffman.c index 959053f774..f848f3690b 100644 --- a/contrib/libs/nghttp2/lib/nghttp2_hd_huffman.c +++ b/contrib/libs/nghttp2/lib/nghttp2_hd_huffman.c @@ -116,7 +116,9 @@ nghttp2_ssize nghttp2_hd_huff_decode(nghttp2_hd_huff_decode_context *ctx, uint8_t c; /* We use the decoding algorithm described in - http://graphics.ics.uci.edu/pub/Prefix.pdf */ + - http://graphics.ics.uci.edu/pub/Prefix.pdf [!!! NO LONGER VALID !!!] + - https://ics.uci.edu/~dan/pubs/Prefix.pdf + - https://github.com/nghttp2/nghttp2/files/15141264/Prefix.pdf */ for (; src != end;) { c = *src++; t = &huff_decode_table[t->fstate & 0x1ff][c >> 4]; diff --git a/contrib/libs/nghttp2/lib/nghttp2_helper.c b/contrib/libs/nghttp2/lib/nghttp2_helper.c index b3563d98e0..9a2407ab6f 100644 --- a/contrib/libs/nghttp2/lib/nghttp2_helper.c +++ b/contrib/libs/nghttp2/lib/nghttp2_helper.c @@ -160,7 +160,7 @@ int nghttp2_adjust_local_window_size(int32_t *local_window_size_ptr, int32_t recv_reduction_delta; int32_t delta; int32_t new_recv_window_size = - nghttp2_max(0, *recv_window_size_ptr) - *delta_ptr; + nghttp2_max_int32(0, *recv_window_size_ptr) - *delta_ptr; if (new_recv_window_size >= 0) { *recv_window_size_ptr = new_recv_window_size; @@ -177,7 +177,7 @@ int nghttp2_adjust_local_window_size(int32_t *local_window_size_ptr, *local_window_size_ptr += delta; /* If there is recv_reduction due to earlier window_size reduction, we have to adjust it too. */ - recv_reduction_delta = nghttp2_min(*recv_reduction_ptr, delta); + recv_reduction_delta = nghttp2_min_int32(*recv_reduction_ptr, delta); *recv_reduction_ptr -= recv_reduction_delta; if (*recv_window_size_ptr < 0) { *recv_window_size_ptr += recv_reduction_delta; @@ -233,7 +233,7 @@ int nghttp2_increase_local_window_size(int32_t *local_window_size_ptr, *local_window_size_ptr += delta; /* If there is recv_reduction due to earlier window_size reduction, we have to adjust it too. */ - recv_reduction_delta = nghttp2_min(*recv_reduction_ptr, delta); + recv_reduction_delta = nghttp2_min_int32(*recv_reduction_ptr, delta); *recv_reduction_ptr -= recv_reduction_delta; *recv_window_size_ptr += recv_reduction_delta; diff --git a/contrib/libs/nghttp2/lib/nghttp2_helper.h b/contrib/libs/nghttp2/lib/nghttp2_helper.h index b1f18ce541..01b85c44ed 100644 --- a/contrib/libs/nghttp2/lib/nghttp2_helper.h +++ b/contrib/libs/nghttp2/lib/nghttp2_helper.h @@ -35,8 +35,31 @@ #include <nghttp2/nghttp2.h> #include "nghttp2_mem.h" -#define nghttp2_min(A, B) ((A) < (B) ? (A) : (B)) -#define nghttp2_max(A, B) ((A) > (B) ? (A) : (B)) +#define nghttp2_max_def(SUFFIX, T) \ + static inline T nghttp2_max_##SUFFIX(T a, T b) { return a < b ? b : a; } + +nghttp2_max_def(int8, int8_t); +nghttp2_max_def(int16, int16_t); +nghttp2_max_def(int32, int32_t); +nghttp2_max_def(int64, int64_t); +nghttp2_max_def(uint8, uint8_t); +nghttp2_max_def(uint16, uint16_t); +nghttp2_max_def(uint32, uint32_t); +nghttp2_max_def(uint64, uint64_t); +nghttp2_max_def(size, size_t); + +#define nghttp2_min_def(SUFFIX, T) \ + static inline T nghttp2_min_##SUFFIX(T a, T b) { return a < b ? a : b; } + +nghttp2_min_def(int8, int8_t); +nghttp2_min_def(int16, int16_t); +nghttp2_min_def(int32, int32_t); +nghttp2_min_def(int64, int64_t); +nghttp2_min_def(uint8, uint8_t); +nghttp2_min_def(uint16, uint16_t); +nghttp2_min_def(uint32, uint32_t); +nghttp2_min_def(uint64, uint64_t); +nghttp2_min_def(size, size_t); #define lstreq(A, B, N) ((sizeof((A)) - 1) == (N) && memcmp((A), (B), (N)) == 0) diff --git a/contrib/libs/nghttp2/lib/nghttp2_pq.c b/contrib/libs/nghttp2/lib/nghttp2_pq.c index 64353acc96..e79ba8365e 100644 --- a/contrib/libs/nghttp2/lib/nghttp2_pq.c +++ b/contrib/libs/nghttp2/lib/nghttp2_pq.c @@ -69,7 +69,7 @@ int nghttp2_pq_push(nghttp2_pq *pq, nghttp2_pq_entry *item) { void *nq; size_t ncapacity; - ncapacity = nghttp2_max(4, (pq->capacity * 2)); + ncapacity = nghttp2_max_size(4, (pq->capacity * 2)); nq = nghttp2_mem_realloc(pq->mem, pq->q, ncapacity * sizeof(nghttp2_pq_entry *)); diff --git a/contrib/libs/nghttp2/lib/nghttp2_ratelim.c b/contrib/libs/nghttp2/lib/nghttp2_ratelim.c index 7011655b00..604ac0801a 100644 --- a/contrib/libs/nghttp2/lib/nghttp2_ratelim.c +++ b/contrib/libs/nghttp2/lib/nghttp2_ratelim.c @@ -61,7 +61,7 @@ void nghttp2_ratelim_update(nghttp2_ratelim *rl, uint64_t tstamp) { } rl->val += gain; - rl->val = nghttp2_min(rl->val, rl->burst); + rl->val = nghttp2_min_uint64(rl->val, rl->burst); } int nghttp2_ratelim_drain(nghttp2_ratelim *rl, uint64_t n) { diff --git a/contrib/libs/nghttp2/lib/nghttp2_session.c b/contrib/libs/nghttp2/lib/nghttp2_session.c index 004a4dffaa..54746fb37b 100644 --- a/contrib/libs/nghttp2/lib/nghttp2_session.c +++ b/contrib/libs/nghttp2/lib/nghttp2_session.c @@ -1700,10 +1700,11 @@ int nghttp2_session_adjust_idle_stream(nghttp2_session *session) { /* Make minimum number of idle streams 16, and maximum 100, which are arbitrary chosen numbers. */ - max = nghttp2_min( - 100, nghttp2_max( - 16, nghttp2_min(session->local_settings.max_concurrent_streams, - session->pending_local_max_concurrent_stream))); + max = nghttp2_min_uint32( + 100, nghttp2_max_uint32( + 16, nghttp2_min_uint32( + session->local_settings.max_concurrent_streams, + session->pending_local_max_concurrent_stream))); DEBUGF("stream: adjusting kept idle streams num_idle_streams=%zu, max=%zu\n", session->num_idle_streams, max); @@ -2131,10 +2132,11 @@ static nghttp2_ssize nghttp2_session_enforce_flow_control_limits( session->remote_window_size, session->remote_settings.max_frame_size, stream->stream_id, stream->remote_window_size); - return nghttp2_min(nghttp2_min(nghttp2_min(requested_window_size, - stream->remote_window_size), - session->remote_window_size), - (int32_t)session->remote_settings.max_frame_size); + return nghttp2_min_int32( + nghttp2_min_int32(nghttp2_min_int32((int32_t)requested_window_size, + stream->remote_window_size), + session->remote_window_size), + (int32_t)session->remote_settings.max_frame_size); } /* @@ -2218,7 +2220,7 @@ static nghttp2_ssize session_call_select_padding(nghttp2_session *session, } max_paddedlen = - nghttp2_min(frame->hd.length + NGHTTP2_MAX_PADLEN, max_payloadlen); + nghttp2_min_size(frame->hd.length + NGHTTP2_MAX_PADLEN, max_payloadlen); if (session->callbacks.select_padding_callback2) { rv = session->callbacks.select_padding_callback2( @@ -2248,8 +2250,8 @@ static int session_headers_add_pad(nghttp2_session *session, aob = &session->aob; framebufs = &aob->framebufs; - max_payloadlen = nghttp2_min(NGHTTP2_MAX_PAYLOADLEN, - frame->hd.length + NGHTTP2_MAX_PADLEN); + max_payloadlen = nghttp2_min_size(NGHTTP2_MAX_PAYLOADLEN, + frame->hd.length + NGHTTP2_MAX_PADLEN); padded_payloadlen = session_call_select_padding(session, frame, max_payloadlen); @@ -2289,7 +2291,7 @@ static int session_pack_extension(nghttp2_session *session, nghttp2_bufs *bufs, session->callbacks.pack_extension_callback); buf = &bufs->head->buf; - buflen = nghttp2_min(nghttp2_buf_avail(buf), NGHTTP2_MAX_PAYLOADLEN); + buflen = nghttp2_min_size(nghttp2_buf_avail(buf), NGHTTP2_MAX_PAYLOADLEN); if (session->callbacks.pack_extension_callback2) { rv = session->callbacks.pack_extension_callback2(session, buf->last, buflen, @@ -4708,7 +4710,8 @@ int nghttp2_session_update_local_settings(nghttp2_session *session, case NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: header_table_size_seen = 1; header_table_size = iv[i].value; - min_header_table_size = nghttp2_min(min_header_table_size, iv[i].value); + min_header_table_size = + nghttp2_min_uint32(min_header_table_size, iv[i].value); break; case NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: new_initial_window_size = (int32_t)iv[i].value; @@ -5594,7 +5597,7 @@ static int session_update_consumed_size(nghttp2_session *session, /* recv_window_size may be smaller than consumed_size, because it may be decreased by negative value with nghttp2_submit_window_update(). */ - recv_size = nghttp2_min(*consumed_size_ptr, *recv_window_size_ptr); + recv_size = nghttp2_min_int32(*consumed_size_ptr, *recv_window_size_ptr); if (nghttp2_should_send_window_update(local_window_size, recv_size)) { rv = nghttp2_session_add_window_update(session, NGHTTP2_FLAG_NONE, @@ -5717,7 +5720,7 @@ fail: static size_t inbound_frame_payload_readlen(nghttp2_inbound_frame *iframe, const uint8_t *in, const uint8_t *last) { - return nghttp2_min((size_t)(last - in), iframe->payloadleft); + return nghttp2_min_size((size_t)(last - in), iframe->payloadleft); } /* @@ -5732,8 +5735,8 @@ static size_t inbound_frame_buf_read(nghttp2_inbound_frame *iframe, const uint8_t *in, const uint8_t *last) { size_t readlen; - readlen = - nghttp2_min((size_t)(last - in), nghttp2_buf_mark_avail(&iframe->sbuf)); + readlen = nghttp2_min_size((size_t)(last - in), + nghttp2_buf_mark_avail(&iframe->sbuf)); iframe->sbuf.last = nghttp2_cpymem(iframe->sbuf.last, in, readlen); @@ -5900,7 +5903,7 @@ nghttp2_ssize nghttp2_session_mem_recv2(nghttp2_session *session, for (;;) { switch (iframe->state) { case NGHTTP2_IB_READ_CLIENT_MAGIC: - readlen = nghttp2_min(inlen, iframe->payloadleft); + readlen = nghttp2_min_size(inlen, iframe->payloadleft); if (memcmp(&NGHTTP2_CLIENT_MAGIC[NGHTTP2_CLIENT_MAGIC_LEN - iframe->payloadleft], @@ -7509,7 +7512,8 @@ int nghttp2_session_add_goaway(nghttp2_session *session, int32_t last_stream_id, /* last_stream_id must not be increased from the value previously sent */ - last_stream_id = nghttp2_min(last_stream_id, session->local_last_stream_id); + last_stream_id = + nghttp2_min_int32(last_stream_id, session->local_last_stream_id); nghttp2_frame_goaway_init(&frame->goaway, last_stream_id, error_code, opaque_data_copy, opaque_data_len); @@ -7823,7 +7827,8 @@ int nghttp2_session_pack_data(nghttp2_session *session, nghttp2_bufs *bufs, frame->hd.length = (size_t)payloadlen; frame->data.padlen = 0; - max_payloadlen = nghttp2_min(datamax, frame->hd.length + NGHTTP2_MAX_PADLEN); + max_payloadlen = + nghttp2_min_size(datamax, frame->hd.length + NGHTTP2_MAX_PADLEN); padded_payloadlen = session_call_select_padding(session, frame, max_payloadlen); @@ -7997,7 +8002,7 @@ int32_t nghttp2_session_get_stream_remote_window_size(nghttp2_session *session, /* stream->remote_window_size can be negative when SETTINGS_INITIAL_WINDOW_SIZE is changed. */ - return nghttp2_max(0, stream->remote_window_size); + return nghttp2_max_int32(0, stream->remote_window_size); } int32_t nghttp2_session_get_remote_window_size(nghttp2_session *session) { diff --git a/contrib/libs/nghttp2/lib/nghttp2_stream.c b/contrib/libs/nghttp2/lib/nghttp2_stream.c index f1951f879d..bf8b8c39e2 100644 --- a/contrib/libs/nghttp2/lib/nghttp2_stream.c +++ b/contrib/libs/nghttp2/lib/nghttp2_stream.c @@ -312,7 +312,7 @@ int32_t nghttp2_stream_dep_distributed_weight(nghttp2_stream *stream, int32_t weight) { weight = stream->weight * weight / stream->sum_dep_weight; - return nghttp2_max(1, weight); + return nghttp2_max_int32(1, weight); } #ifdef STREAM_DEP_DEBUG diff --git a/contrib/libs/nghttp2/lib/nghttp2_submit.c b/contrib/libs/nghttp2/lib/nghttp2_submit.c index f947969cd9..72e6588ffb 100644 --- a/contrib/libs/nghttp2/lib/nghttp2_submit.c +++ b/contrib/libs/nghttp2/lib/nghttp2_submit.c @@ -411,10 +411,10 @@ int nghttp2_submit_window_update(nghttp2_session *session, uint8_t flags, if (window_size_increment > 0) { if (stream_id == 0) { session->consumed_size = - nghttp2_max(0, session->consumed_size - window_size_increment); + nghttp2_max_int32(0, session->consumed_size - window_size_increment); } else { stream->consumed_size = - nghttp2_max(0, stream->consumed_size - window_size_increment); + nghttp2_max_int32(0, stream->consumed_size - window_size_increment); } return nghttp2_session_add_window_update(session, 0, stream_id, diff --git a/contrib/libs/nghttp2/ya.make b/contrib/libs/nghttp2/ya.make index c12d6e78ed..bd3f4e3223 100644 --- a/contrib/libs/nghttp2/ya.make +++ b/contrib/libs/nghttp2/ya.make @@ -9,9 +9,9 @@ LICENSE( LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -VERSION(1.61.0) +VERSION(1.62.0) -ORIGINAL_SOURCE(https://github.com/nghttp2/nghttp2/archive/v1.61.0.tar.gz) +ORIGINAL_SOURCE(https://github.com/nghttp2/nghttp2/archive/v1.62.0.tar.gz) ADDINCL( GLOBAL contrib/libs/nghttp2/lib/includes |