connection: attached transfer count

Since we no longer traverse the transfers attached to a connection,
change the sparse bitset to just a `uint32_t` counter.

This makes multi_ev the single user of sparse bitsets for transfers
using a socket and allocation failures are handled there correctly.

Refs #19818
Closes #19836
This commit is contained in:
Stefan Eissing 2025-12-04 17:15:33 +01:00 committed by Daniel Stenberg
parent 1def380032
commit d7928029fc
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
10 changed files with 29 additions and 44 deletions

View file

@ -61,20 +61,6 @@ uint32_t Curl_uint32_spbset_count(struct uint32_spbset *bset)
return n;
}
bool Curl_uint32_spbset_empty(struct uint32_spbset *bset)
{
struct uint32_spbset_chunk *chunk;
uint32_t i;
for(chunk = &bset->head; chunk; chunk = chunk->next) {
for(i = 0; i < CURL_UINT32_SPBSET_CH_SLOTS; ++i) {
if(chunk->slots[i])
return FALSE;
}
}
return TRUE;
}
UNITTEST void Curl_uint32_spbset_clear(struct uint32_spbset *bset)
{
struct uint32_spbset_chunk *next, *chunk;