gentoo-ebuilds/net-misc/curl/files/curl-8.17.0-progress-parallel.patch
Sam James 222904ab41
net-misc/curl: backport 3 regression fixes to 8.17.0
See https://curl.se/mail/distros-2025-11/0000.html. This also fixes
a CVE in wcurl.

Bug: https://bugs.gentoo.org/966140
Signed-off-by: Sam James <sam@gentoo.org>
2025-11-16 10:24:08 +00:00

54 lines
1.8 KiB
Diff

https://github.com/curl/curl/pull/19383
From a5038ff41f83907c896a41716f4f78a80a144cd1 Mon Sep 17 00:00:00 2001
From: Stefan Eissing <stefan@eissing.org>
Date: Thu, 6 Nov 2025 12:47:33 +0100
Subject: [PATCH] curl: fix progress meter in parallel mode
With `check_finished()` triggered by notifications now, the
`progress_meter()` was no longer called at regular intervals.
Move `progress_meter()` out of `check_finishe()` into the perform
loop and event callbacks.
---
src/tool_operate.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 74f5da5fa915..e1f61a2ba519 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1549,6 +1549,7 @@ static void on_uv_socket(uv_poll_t *req, int status, int events)
curl_multi_socket_action(c->uv->s->multi, c->sockfd, flags,
&c->uv->s->still_running);
+ progress_meter(c->uv->s->multi, &c->uv->s->start, FALSE);
}
/* callback from libuv when timeout expires */
@@ -1561,6 +1562,7 @@ static void on_uv_timeout(uv_timer_t *req)
if(uv && uv->s) {
curl_multi_socket_action(uv->s->multi, CURL_SOCKET_TIMEOUT, 0,
&uv->s->still_running);
+ progress_meter(uv->s->multi, &uv->s->start, FALSE);
}
}
@@ -1733,7 +1735,6 @@ static CURLcode check_finished(struct parastate *s)
int rc;
CURLMsg *msg;
bool checkmore = FALSE;
- progress_meter(s->multi, &s->start, FALSE);
do {
msg = curl_multi_info_read(s->multi, &rc);
if(msg) {
@@ -1875,6 +1876,8 @@ static CURLcode parallel_transfers(CURLSH *share)
s->mcode = curl_multi_poll(s->multi, NULL, 0, 1000, NULL);
if(!s->mcode)
s->mcode = curl_multi_perform(s->multi, &s->still_running);
+
+ progress_meter(s->multi, &s->start, FALSE);
}
(void)progress_meter(s->multi, &s->start, TRUE);