diff options
author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2021-09-12 15:27:33 +0900 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-09-12 12:34:32 +0200 |
commit | 24a7cbe9d22cb1783a33b94288b656191b0e4375 (patch) | |
tree | d54951264faf096320e67ccf310ec733fe65f41b /lib | |
parent | dbe693e76973a12dfe39466c10cd83922813feef (diff) | |
download | curl-24a7cbe9d22cb1783a33b94288b656191b0e4375.tar.gz |
ngtcp2: fix build with ngtcp2 and nghttp3
ngtcp2_conn_client_new and nghttp3_conn_client_new are now macros.
Check the wrapped functions instead.
ngtcp2_stream_close callback now takes flags parameter.
Closes #7709
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vquic/ngtcp2.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c index 776cdc069..9fcfe81a8 100644 --- a/lib/vquic/ngtcp2.c +++ b/lib/vquic/ngtcp2.c @@ -559,8 +559,8 @@ cb_acked_stream_data_offset(ngtcp2_conn *tconn, int64_t stream_id, return 0; } -static int cb_stream_close(ngtcp2_conn *tconn, int64_t stream_id, - uint64_t app_error_code, +static int cb_stream_close(ngtcp2_conn *tconn, uint32_t flags, + int64_t stream_id, uint64_t app_error_code, void *user_data, void *stream_user_data) { struct quicsocket *qs = (struct quicsocket *)user_data; @@ -569,6 +569,10 @@ static int cb_stream_close(ngtcp2_conn *tconn, int64_t stream_id, (void)stream_user_data; /* stream is closed... */ + if(!(flags & NGTCP2_STREAM_CLOSE_FLAG_APP_ERROR_CODE_SET)) { + app_error_code = NGHTTP3_H3_NO_ERROR; + } + rv = nghttp3_conn_close_stream(qs->h3conn, stream_id, app_error_code); if(rv) { |