From: Jay Satiro Date: Mon, 17 Oct 2022 06:44:12 +0000 (-0400) Subject: ngtcp2: Fix build errors due to changes in ngtcp2 library X-Git-Tag: curl-7_86_0~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b066de4885730681d1b86844fc8ef492e51d972;p=thirdparty%2Fcurl.git ngtcp2: Fix build errors due to changes in ngtcp2 library ngtcp2/ngtcp2@b0d86f60 changed: - ngtcp2_conn_get_max_udp_payload_size => ngtcp2_conn_get_max_tx_udp_payload_size - ngtcp2_conn_get_path_max_udp_payload_size => ngtcp2_conn_get_path_max_tx_udp_payload_size ngtcp2/ngtcp2@ec59b873 changed: - 'early_data_rejected' member added to ng_callbacks. Assisted-by: Daniel Stenberg Reported-by: jurisuk@users.noreply.github.com Fixes https://github.com/curl/curl/issues/9747 Closes https://github.com/curl/curl/pull/9748 --- diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c index e775c2fc83..097cca44b0 100644 --- a/lib/vquic/ngtcp2.c +++ b/lib/vquic/ngtcp2.c @@ -760,6 +760,7 @@ static ngtcp2_callbacks ng_callbacks = { NULL, /* version_negotiation */ cb_recv_rx_key, NULL, /* recv_tx_key */ + NULL, /* early_data_rejected */ }; /* @@ -1835,9 +1836,9 @@ static CURLcode do_sendmsg(size_t *psent, struct Curl_easy *data, int sockfd, #ifdef HAVE_SENDMSG struct iovec msg_iov; struct msghdr msg = {0}; - uint8_t msg_ctrl[32]; ssize_t sent; #if defined(__linux__) && defined(UDP_SEGMENT) + uint8_t msg_ctrl[32]; struct cmsghdr *cm; #endif @@ -1988,9 +1989,9 @@ static CURLcode ng_flush_egress(struct Curl_easy *data, ngtcp2_ssize outlen; uint8_t *outpos = qs->pktbuf; size_t max_udp_payload_size = - ngtcp2_conn_get_max_udp_payload_size(qs->qconn); + ngtcp2_conn_get_max_tx_udp_payload_size(qs->qconn); size_t path_max_udp_payload_size = - ngtcp2_conn_get_path_max_udp_payload_size(qs->qconn); + ngtcp2_conn_get_path_max_tx_udp_payload_size(qs->qconn); size_t max_pktcnt = CURLMIN(MAX_PKT_BURST, qs->pktbuflen / max_udp_payload_size); size_t pktcnt = 0;