diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-06-08 09:33:51 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-06-08 11:11:00 +0200 |
commit | 99e09d9046bfc7b13c09022248d17e5daf08e0e0 (patch) | |
tree | 76f09cd437bd89ad58ca71c3db89174527c97628 | |
parent | b950120b2d7ab70cb4aa900ae1e5ddc415afdf45 (diff) |
ngtcp2: update with recent API changes
Syncs with ngtcp2 commit 7e9a917d386d98 merged June 7 2020.
Assisted-by: Tatsuhiro Tsujikawa
Closes #5538
-rw-r--r-- | lib/vquic/ngtcp2.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c index eaff638b4..5a87a29be 100644 --- a/lib/vquic/ngtcp2.c +++ b/lib/vquic/ngtcp2.c @@ -584,13 +584,14 @@ static void extend_stream_window(ngtcp2_conn *tconn, } -static int cb_recv_stream_data(ngtcp2_conn *tconn, int64_t stream_id, - int fin, uint64_t offset, +static int cb_recv_stream_data(ngtcp2_conn *tconn, uint32_t flags, + int64_t stream_id, uint64_t offset, const uint8_t *buf, size_t buflen, void *user_data, void *stream_user_data) { struct quicsocket *qs = (struct quicsocket *)user_data; ssize_t nconsumed; + int fin = flags & NGTCP2_STREAM_DATA_FLAG_FIN ? 1 : 0; (void)offset; (void)stream_user_data; @@ -756,7 +757,8 @@ static ngtcp2_conn_callbacks ng_callbacks = { NULL, /* extend_max_remote_streams_uni */ cb_extend_max_stream_data, NULL, /* dcid_status */ - NULL /* handshake_confirmed */ + NULL, /* handshake_confirmed */ + NULL /* recv_new_token */ }; /* @@ -1792,11 +1794,12 @@ static CURLcode ng_flush_egress(struct connectdata *conn, int sockfd, return CURLE_SEND_ERROR; } else if(veccnt > 0) { + uint32_t flags = NGTCP2_WRITE_STREAM_FLAG_MORE | + (fin ? NGTCP2_WRITE_STREAM_FLAG_FIN : 0); outlen = ngtcp2_conn_writev_stream(qs->qconn, &ps.path, out, pktlen, &ndatalen, - NGTCP2_WRITE_STREAM_FLAG_MORE, - stream_id, fin, + flags, stream_id, (const ngtcp2_vec *)vec, veccnt, ts); if(outlen == 0) { break; |