Start queued lookups while we have child slots free. A failed start * finishes its lookup (with an error, via callback) without ever taking a * slot, so the loop simply moves on to the next one. */
| 205 | * finishes its lookup (with an error, via callback) without ever taking a |
| 206 | * slot, so the loop simply moves on to the next one. */ |
| 207 | static void dns_pump_queue(void) |
| 208 | { |
| 209 | while (dns_num_active < DNS_MAX_CONCURRENT_LOOKUPS |
| 210 | && !list_empty(&dns_queue)) { |
| 211 | struct dns_lookup *lookup |
| 212 | = list_pop(&dns_queue, struct dns_lookup, list); |
| 213 | lookup->queued = false; |
| 214 | dns_start(lookup); |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | /*~ Parsing the child's output: strictly, and fail-closed on anything |
| 219 | * unexpected. */ |
no test coverage detected