diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-08-26 15:25:53 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-08-26 15:26:34 +0200 |
commit | 9677d22b290f1d371ec0d2d6ce5285b4acde4f04 (patch) | |
tree | cdd2c89ff816ce31e79de238c827564e2ad0d4e8 | |
parent | 259a81555d4081952f6b7e30b5fa86fff356869b (diff) | |
download | curl-bagder/ngtcp2-pkt_info.tar.gz |
ngtcp2: adapt to the new pkt_info argumentsbagder/ngtcp2-pkt_info
Guidance-by: Tatsuhiro Tsujikawa
-rw-r--r-- | lib/vquic/ngtcp2.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c index 20ee08dd6..82a8a3ee5 100644 --- a/lib/vquic/ngtcp2.c +++ b/lib/vquic/ngtcp2.c @@ -1729,6 +1729,7 @@ static CURLcode ng_process_ingress(struct connectdata *conn, int sockfd, socklen_t remote_addrlen; ngtcp2_path path; ngtcp2_tstamp ts = timestamp(); + ngtcp2_pkt_info pi = { 0 }; for(;;) { remote_addrlen = sizeof(remote_addr); @@ -1750,7 +1751,7 @@ static CURLcode ng_process_ingress(struct connectdata *conn, int sockfd, ngtcp2_addr_init(&path.remote, (struct sockaddr *)&remote_addr, remote_addrlen, NULL); - rv = ngtcp2_conn_read_pkt(qs->qconn, &path, buf, recvd, ts); + rv = ngtcp2_conn_read_pkt(qs->qconn, &path, &pi, buf, recvd, ts); if(rv != 0) { /* TODO Send CONNECTION_CLOSE if possible */ return CURLE_RECV_ERROR; @@ -1815,7 +1816,7 @@ static CURLcode ng_flush_egress(struct connectdata *conn, int sockfd, uint32_t flags = NGTCP2_WRITE_STREAM_FLAG_MORE | (fin ? NGTCP2_WRITE_STREAM_FLAG_FIN : 0); outlen = - ngtcp2_conn_writev_stream(qs->qconn, &ps.path, + ngtcp2_conn_writev_stream(qs->qconn, &ps.path, NULL, out, pktlen, &ndatalen, flags, stream_id, (const ngtcp2_vec *)vec, veccnt, ts); @@ -1860,7 +1861,8 @@ static CURLcode ng_flush_egress(struct connectdata *conn, int sockfd, } } if(outlen < 0) { - outlen = ngtcp2_conn_write_pkt(qs->qconn, &ps.path, out, pktlen, ts); + outlen = ngtcp2_conn_write_pkt(qs->qconn, &ps.path, NULL, + out, pktlen, ts); if(outlen < 0) { failf(conn->data, "ngtcp2_conn_write_pkt returned error: %s\n", ngtcp2_strerror((int)outlen)); |