summaryrefslogtreecommitdiffstats
path: root/src/inflatehd.cc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/inflatehd.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/inflatehd.cc b/src/inflatehd.cc
index f484042..537b4fa 100644
--- a/src/inflatehd.cc
+++ b/src/inflatehd.cc
@@ -41,6 +41,7 @@
#include <jansson.h>
+#define NGHTTP2_NO_SSIZE_T
#include <nghttp2/nghttp2.h>
#include "template.h"
@@ -93,7 +94,6 @@ static void to_json(nghttp2_hd_inflater *inflater, json_t *headers,
}
static int inflate_hd(json_t *obj, nghttp2_hd_inflater *inflater, int seq) {
- ssize_t rv;
nghttp2_nv nv;
int inflate_flags;
size_t old_settings_table_size =
@@ -120,8 +120,8 @@ static int inflate_hd(json_t *obj, nghttp2_hd_inflater *inflater, int seq) {
seq);
return -1;
}
- rv = nghttp2_hd_inflate_change_table_size(inflater,
- json_integer_value(table_size));
+ auto rv = nghttp2_hd_inflate_change_table_size(
+ inflater, json_integer_value(table_size));
if (rv != 0) {
fprintf(stderr,
"nghttp2_hd_change_table_size() failed with error %s at %d\n",
@@ -147,7 +147,8 @@ static int inflate_hd(json_t *obj, nghttp2_hd_inflater *inflater, int seq) {
auto p = buf.data();
for (;;) {
inflate_flags = 0;
- rv = nghttp2_hd_inflate_hd(inflater, &nv, &inflate_flags, p, buflen, 1);
+ auto rv =
+ nghttp2_hd_inflate_hd3(inflater, &nv, &inflate_flags, p, buflen, 1);
if (rv < 0) {
fprintf(stderr, "inflate failed with error code %zd at %d\n", rv, seq);
exit(EXIT_FAILURE);