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
This commit is contained in:
Jay Satiro 2022-10-17 02:44:12 -04:00
parent 025bad1182
commit 6b066de488

View file

@ -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;