From 178e7d311284813d88f64a6cdd4e7d29339db666 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 18 Sep 2024 13:21:27 -0400 Subject: [PATCH] curl: Assert that curl_multi_assign worked ref https://github.com/ostreedev/ostree/issues/3299 This won't fix that issue, but *if* this assertion triggers it should give us a better idea of the possible codepaths where it is happening. Signed-off-by: Colin Walters Origin: upstream, 2024.8, commit:472d9d493a3e4a08415da4c337a7e831e0c5a5e2 Bug-Debian: https://bugs.debian.org/1082121 Gbp-Pq: Name curl-Assert-that-curl_multi_assign-worked.patch --- src/libostree/ostree-fetcher-curl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libostree/ostree-fetcher-curl.c b/src/libostree/ostree-fetcher-curl.c index d6902893..5808c451 100644 --- a/src/libostree/ostree-fetcher-curl.c +++ b/src/libostree/ostree-fetcher-curl.c @@ -517,7 +517,8 @@ addsock (curl_socket_t s, CURL *easy, int action, OstreeFetcher *fetcher) fdp->refcount = 1; fdp->fetcher = fetcher; setsock (fdp, s, action, fetcher); - curl_multi_assign (fetcher->multi, s, fdp); + CURLMcode rc = curl_multi_assign (fetcher->multi, s, fdp); + g_assert_cmpint (rc, ==, CURLM_OK); g_hash_table_add (fetcher->sockets, fdp); }