summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c9fe4af)
on_conflict_dispatch() uses hashmap_steal_first() and then does
something non-trivial with it. It may care about the order.
dns_transaction_free(t);
}
dns_transaction_free(t);
}
- while ((rr = hashmap_steal_first(s->conflict_queue)))
+ while ((rr = ordered_hashmap_steal_first(s->conflict_queue)))
dns_resource_record_unref(rr);
dns_resource_record_unref(rr);
- hashmap_free(s->conflict_queue);
+ ordered_hashmap_free(s->conflict_queue);
sd_event_source_unref(s->conflict_event_source);
dns_cache_flush(&s->cache);
sd_event_source_unref(s->conflict_event_source);
dns_cache_flush(&s->cache);
_cleanup_(dns_resource_record_unrefp) DnsResourceRecord *rr = NULL;
_cleanup_(dns_packet_unrefp) DnsPacket *p = NULL;
_cleanup_(dns_resource_record_unrefp) DnsResourceRecord *rr = NULL;
_cleanup_(dns_packet_unrefp) DnsPacket *p = NULL;
- rr = hashmap_steal_first(scope->conflict_queue);
+ rr = ordered_hashmap_steal_first(scope->conflict_queue);
/* We don't send these queries immediately. Instead, we queue
* them, and send them after some jitter delay. */
/* We don't send these queries immediately. Instead, we queue
* them, and send them after some jitter delay. */
- r = hashmap_ensure_allocated(&scope->conflict_queue, &dns_resource_key_hash_ops);
+ r = ordered_hashmap_ensure_allocated(&scope->conflict_queue, &dns_resource_key_hash_ops);
if (r < 0) {
log_oom();
return r;
if (r < 0) {
log_oom();
return r;
/* We only place one RR per key in the conflict
* messages, not all of them. That should be enough to
* indicate where there might be a conflict */
/* We only place one RR per key in the conflict
* messages, not all of them. That should be enough to
* indicate where there might be a conflict */
- r = hashmap_put(scope->conflict_queue, rr->key, rr);
+ r = ordered_hashmap_put(scope->conflict_queue, rr->key, rr);
if (r == -EEXIST || r == 0)
return 0;
if (r < 0) {
if (r == -EEXIST || r == 0)
return 0;
if (r < 0) {
DnsCache cache;
DnsZone zone;
DnsCache cache;
DnsZone zone;
- Hashmap *conflict_queue;
+ OrderedHashmap *conflict_queue;
sd_event_source *conflict_event_source;
RateLimit ratelimit;
sd_event_source *conflict_event_source;
RateLimit ratelimit;