summaryrefslogtreecommitdiffstats
path: root/src/deflatehd.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:52:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:52:01 +0000
commit42f47327da6a208ac3cd1f9bca07fc506ed51a63 (patch)
treee06c5e993e0d0b618f616280b372506b1f0f8419 /src/deflatehd.cc
parentAdding debian version 1.59.0-1. (diff)
downloadnghttp2-42f47327da6a208ac3cd1f9bca07fc506ed51a63.tar.xz
nghttp2-42f47327da6a208ac3cd1f9bca07fc506ed51a63.zip
Merging upstream version 1.60.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/deflatehd.cc')
-rw-r--r--src/deflatehd.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/deflatehd.cc b/src/deflatehd.cc
index 7dcfccf..ad472de 100644
--- a/src/deflatehd.cc
+++ b/src/deflatehd.cc
@@ -41,6 +41,7 @@
#include <jansson.h>
+#define NGHTTP2_NO_SSIZE_T
#include <nghttp2/nghttp2.h>
#include "template.h"
@@ -113,11 +114,10 @@ static void output_to_json(nghttp2_hd_deflater *deflater, const uint8_t *buf,
static void deflate_hd(nghttp2_hd_deflater *deflater,
const std::vector<nghttp2_nv> &nva, size_t inputlen,
int seq) {
- ssize_t rv;
std::array<uint8_t, 64_k> buf;
- rv = nghttp2_hd_deflate_hd(deflater, buf.data(), buf.size(),
- (nghttp2_nv *)nva.data(), nva.size());
+ auto rv = nghttp2_hd_deflate_hd2(deflater, buf.data(), buf.size(),
+ (nghttp2_nv *)nva.data(), nva.size());
if (rv < 0) {
fprintf(stderr, "deflate failed with error code %zd at %d\n", rv, seq);
exit(EXIT_FAILURE);