mirror of
https://github.com/curl/curl.git
synced 2026-08-26 11:43:32 +03:00
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:
parent
1def380032
commit
d7928029fc
10 changed files with 29 additions and 44 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue