summaryrefslogtreecommitdiffstats
path: root/lib/vquic/vquic.c
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@lists.haxx.se>2024-01-31 07:03:52 (GMT)
committerBrad King <brad.king@kitware.com>2024-01-31 15:02:06 (GMT)
commit851cc904a0f3615c9560a2eeba83e04556c0090b (patch)
treeace3541720763d68ef6f6741a6ae0674169d4f5c /lib/vquic/vquic.c
parentfe5ffe06a9e09b7be5ff432049cb427894a78dcb (diff)
downloadCMake-851cc904a0f3615c9560a2eeba83e04556c0090b.zip
CMake-851cc904a0f3615c9560a2eeba83e04556c0090b.tar.gz
CMake-851cc904a0f3615c9560a2eeba83e04556c0090b.tar.bz2
curl 2024-01-31 (5ce164e0)
Code extracted from: https://github.com/curl/curl.git at commit 5ce164e0e9290c96eb7d502173426c0a135ec008 (curl-8_6_0).
Diffstat (limited to 'lib/vquic/vquic.c')
-rw-r--r--lib/vquic/vquic.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/vquic/vquic.c b/lib/vquic/vquic.c
index 523b807..612d25b 100644
--- a/lib/vquic/vquic.c
+++ b/lib/vquic/vquic.c
@@ -46,6 +46,7 @@
#include "curl_trc.h"
#include "curl_msh3.h"
#include "curl_ngtcp2.h"
+#include "curl_osslq.h"
#include "curl_quiche.h"
#include "rand.h"
#include "vquic.h"
@@ -74,6 +75,8 @@ void Curl_quic_ver(char *p, size_t len)
{
#if defined(USE_NGTCP2) && defined(USE_NGHTTP3)
Curl_ngtcp2_ver(p, len);
+#elif defined(USE_OPENSSL_QUIC) && defined(USE_NGHTTP3)
+ Curl_osslq_ver(p, len);
#elif defined(USE_QUICHE)
Curl_quiche_ver(p, len);
#elif defined(USE_MSH3)
@@ -179,7 +182,7 @@ static CURLcode do_sendmsg(struct Curl_cfilter *cf,
qctx->no_gso = TRUE;
return send_packet_no_gso(cf, data, qctx, pkt, pktlen, gsolen, psent);
}
- /* FALLTHROUGH */
+ FALLTHROUGH();
default:
failf(data, "sendmsg() returned %zd (errno %d)", sent, SOCKERRNO);
return CURLE_SEND_ERROR;
@@ -543,8 +546,13 @@ CURLcode vquic_recv_packets(struct Curl_cfilter *cf,
#else
result = recvfrom_packets(cf, data, qctx, max_pkts, recv_cb, userp);
#endif
- if(!result)
+ if(!result) {
+ if(!qctx->got_first_byte) {
+ qctx->got_first_byte = TRUE;
+ qctx->first_byte_at = qctx->last_op;
+ }
qctx->last_io = qctx->last_op;
+ }
return result;
}
@@ -603,6 +611,8 @@ CURLcode Curl_cf_quic_create(struct Curl_cfilter **pcf,
DEBUGASSERT(transport == TRNSPRT_QUIC);
#if defined(USE_NGTCP2) && defined(USE_NGHTTP3)
return Curl_cf_ngtcp2_create(pcf, data, conn, ai);
+#elif defined(USE_OPENSSL_QUIC) && defined(USE_NGHTTP3)
+ return Curl_cf_osslq_create(pcf, data, conn, ai);
#elif defined(USE_QUICHE)
return Curl_cf_quiche_create(pcf, data, conn, ai);
#elif defined(USE_MSH3)
@@ -622,6 +632,8 @@ bool Curl_conn_is_http3(const struct Curl_easy *data,
{
#if defined(USE_NGTCP2) && defined(USE_NGHTTP3)
return Curl_conn_is_ngtcp2(data, conn, sockindex);
+#elif defined(USE_OPENSSL_QUIC) && defined(USE_NGHTTP3)
+ return Curl_conn_is_osslq(data, conn, sockindex);
#elif defined(USE_QUICHE)
return Curl_conn_is_quiche(data, conn, sockindex);
#elif defined(USE_MSH3)