Accepting request 1137519 from devel:libraries:c_c++
OBS-URL: https://build.opensuse.org/request/show/1137519 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/curl?expand=0&rev=192
This commit is contained in:
commit
f7fd53cb10
74
curl-adjust-pollset-fix.patch
Normal file
74
curl-adjust-pollset-fix.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
From 3a24ef09af5fe7fdd672dee72ff760f871105a03 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stefan Eissing <stefan@eissing.org>
|
||||||
|
Date: Thu, 4 Jan 2024 10:06:17 +0100
|
||||||
|
Subject: [PATCH] adjust_pollset fix
|
||||||
|
|
||||||
|
- do not add a socket for POLLIN when the transfer does not
|
||||||
|
want to send (for example is paused).
|
||||||
|
- refs #12632
|
||||||
|
---
|
||||||
|
lib/cf-socket.c | 2 +-
|
||||||
|
lib/http2.c | 4 ++--
|
||||||
|
lib/vquic/curl_ngtcp2.c | 7 ++++---
|
||||||
|
lib/vquic/curl_quiche.c | 2 +-
|
||||||
|
4 files changed, 8 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/cf-socket.c b/lib/cf-socket.c
|
||||||
|
index bd4f0d1e97e2d3..c86aa7e7c2a969 100644
|
||||||
|
--- a/lib/cf-socket.c
|
||||||
|
+++ b/lib/cf-socket.c
|
||||||
|
@@ -1243,7 +1243,7 @@ static void cf_socket_adjust_pollset(struct Curl_cfilter *cf,
|
||||||
|
if(ctx->sock != CURL_SOCKET_BAD) {
|
||||||
|
if(!cf->connected)
|
||||||
|
Curl_pollset_set_out_only(data, ps, ctx->sock);
|
||||||
|
- else
|
||||||
|
+ else if(CURL_WANT_RECV(data))
|
||||||
|
Curl_pollset_add_in(data, ps, ctx->sock);
|
||||||
|
CURL_TRC_CF(data, cf, "adjust_pollset -> %d socks", ps->num);
|
||||||
|
}
|
||||||
|
diff --git a/lib/http2.c b/lib/http2.c
|
||||||
|
index dcc24ea102302c..b7a08607945357 100644
|
||||||
|
--- a/lib/http2.c
|
||||||
|
+++ b/lib/http2.c
|
||||||
|
@@ -2341,8 +2341,8 @@ static void cf_h2_adjust_pollset(struct Curl_cfilter *cf,
|
||||||
|
bool c_exhaust, s_exhaust;
|
||||||
|
|
||||||
|
CF_DATA_SAVE(save, cf, data);
|
||||||
|
- c_exhaust = !nghttp2_session_get_remote_window_size(ctx->h2);
|
||||||
|
- s_exhaust = stream && stream->id >= 0 &&
|
||||||
|
+ c_exhaust = want_send && !nghttp2_session_get_remote_window_size(ctx->h2);
|
||||||
|
+ s_exhaust = want_send && stream && stream->id >= 0 &&
|
||||||
|
!nghttp2_session_get_stream_remote_window_size(ctx->h2,
|
||||||
|
stream->id);
|
||||||
|
want_recv = (want_recv || c_exhaust || s_exhaust);
|
||||||
|
diff --git a/lib/vquic/curl_ngtcp2.c b/lib/vquic/curl_ngtcp2.c
|
||||||
|
index f4edf2d636ef93..89f690462d640b 100644
|
||||||
|
--- a/lib/vquic/curl_ngtcp2.c
|
||||||
|
+++ b/lib/vquic/curl_ngtcp2.c
|
||||||
|
@@ -1166,9 +1166,10 @@ static void cf_ngtcp2_adjust_pollset(struct Curl_cfilter *cf,
|
||||||
|
bool c_exhaust, s_exhaust;
|
||||||
|
|
||||||
|
CF_DATA_SAVE(save, cf, data);
|
||||||
|
- c_exhaust = !ngtcp2_conn_get_cwnd_left(ctx->qconn) ||
|
||||||
|
- !ngtcp2_conn_get_max_data_left(ctx->qconn);
|
||||||
|
- s_exhaust = stream && stream->id >= 0 && stream->quic_flow_blocked;
|
||||||
|
+ c_exhaust = want_send && (!ngtcp2_conn_get_cwnd_left(ctx->qconn) ||
|
||||||
|
+ !ngtcp2_conn_get_max_data_left(ctx->qconn));
|
||||||
|
+ s_exhaust = want_send && stream && stream->id >= 0 &&
|
||||||
|
+ stream->quic_flow_blocked;
|
||||||
|
want_recv = (want_recv || c_exhaust || s_exhaust);
|
||||||
|
want_send = (!s_exhaust && want_send) ||
|
||||||
|
!Curl_bufq_is_empty(&ctx->q.sendbuf);
|
||||||
|
diff --git a/lib/vquic/curl_quiche.c b/lib/vquic/curl_quiche.c
|
||||||
|
index 33c2621dc8bf63..9c4df2df0f6955 100644
|
||||||
|
--- a/lib/vquic/curl_quiche.c
|
||||||
|
+++ b/lib/vquic/curl_quiche.c
|
||||||
|
@@ -1189,7 +1189,7 @@ static void cf_quiche_adjust_pollset(struct Curl_cfilter *cf,
|
||||||
|
|
||||||
|
c_exhaust = FALSE; /* Have not found any call in quiche that tells
|
||||||
|
us if the connection itself is blocked */
|
||||||
|
- s_exhaust = stream && stream->id >= 0 &&
|
||||||
|
+ s_exhaust = want_send && stream && stream->id >= 0 &&
|
||||||
|
(stream->quic_flow_blocked || !stream_is_writeable(cf, data));
|
||||||
|
want_recv = (want_recv || c_exhaust || s_exhaust);
|
||||||
|
want_send = (!s_exhaust && want_send) ||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 5 17:54:08 UTC 2024 - Michael Pujos <pujos.michael@gmail.com>
|
||||||
|
|
||||||
|
- Added curl-adjust-pollset-fix.patch to fix broken MPD http streaming:
|
||||||
|
https://github.com/curl/curl/issues/12632
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Dec 6 09:51:20 UTC 2023 - Pedro Monreal <pmonreal@suse.com>
|
Wed Dec 6 09:51:20 UTC 2023 - Pedro Monreal <pmonreal@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package curl
|
# spec file for package curl
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -37,6 +37,8 @@ Patch2: curl-secure-getenv.patch
|
|||||||
Patch3: curl-disabled-redirect-protocol-message.patch
|
Patch3: curl-disabled-redirect-protocol-message.patch
|
||||||
#PATCH-FIX-UPSTREAM dist: add tests/errorcodes.pl to the tarball
|
#PATCH-FIX-UPSTREAM dist: add tests/errorcodes.pl to the tarball
|
||||||
Patch4: curl-tests-errorcodes.patch
|
Patch4: curl-tests-errorcodes.patch
|
||||||
|
# fix MPD http streaming: https://github.com/curl/curl/issues/12632
|
||||||
|
Patch5: curl-adjust-pollset-fix.patch
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
Requires: libcurl4 = %{version}
|
Requires: libcurl4 = %{version}
|
||||||
|
Loading…
Reference in New Issue
Block a user