]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ngtcp2: Fix build errors due to changes in ngtcp2 library
authorJay Satiro <raysatiro@yahoo.com>
Mon, 17 Oct 2022 06:44:12 +0000 (02:44 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Mon, 17 Oct 2022 07:27:03 +0000 (03:27 -0400)
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

lib/vquic/ngtcp2.c

index e775c2fc830d737c13a559fdfb46727c427b2937..097cca44b0cf53e0ef3b5b1f2e1645ae1417be9b 100644 (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;