diff options
| author | Hauke Mehrtens | 2026-05-31 15:25:08 +0000 |
|---|---|---|
| committer | Hauke Mehrtens | 2026-06-07 11:24:28 +0000 |
| commit | 0ba47f319b09d02d101b234c2d7c53419b929a7a (patch) | |
| tree | 7d5919b54a29eac21ebeab727d68b8e767f1a53b | |
| parent | ba1f4311b099969ad70dad93fe493ad9b2180b38 (diff) | |
| download | uclient-0ba47f319b09d02d101b234c2d7c53419b929a7a.tar.gz | |
uclient-fetch: advance to the next URL between requests
request_done() decremented n_urls but never advanced the urls pointer,
so it always re-read *urls (the first of the remaining URLs). When more
than two URLs were given on the command line, the second URL was fetched
repeatedly and the third and later URLs were never downloaded.
Advance urls alongside the n_urls decrement so each URL is fetched once.
Assisted-by: Claude:claude-opus-4-8
Link: https://github.com/openwrt/uclient/pull/16
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
| -rw-r--r-- | uclient-fetch.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/uclient-fetch.c b/uclient-fetch.c index efb9b88..b2f61f9 100644 --- a/uclient-fetch.c +++ b/uclient-fetch.c @@ -430,6 +430,7 @@ static void request_done(struct uclient *cl) uclient_set_url(cl, *urls, auth_str); } n_urls--; + urls++; cur_resume = resume; error_ret = init_request(cl); if (error_ret == 0) |