summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-cache.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-08-21 15:26:45 +0200
committerTom Gundersen <teg@jklm.no>2015-08-21 15:26:45 +0200
commitef7051360aefca01d20f700ee74ac1baced59879 (patch)
tree7e74c19fc5928d35012d1ff99ddce20406cf92a6 /src/resolve/resolved-dns-cache.c
parent6b8b67e7aed7d4f98881f823b89f5f4079e52066 (diff)
parent78c6a153c47f8d597c827bdcaf8c4e42ac87f738 (diff)
Merge pull request #1002 from poettering/resolved-various
resolved: synthesize more RRs locally and other fixes
Diffstat (limited to 'src/resolve/resolved-dns-cache.c')
-rw-r--r--src/resolve/resolved-dns-cache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resolve/resolved-dns-cache.c b/src/resolve/resolved-dns-cache.c
index 81ea1cafcb..eb51b4b895 100644
--- a/src/resolve/resolved-dns-cache.c
+++ b/src/resolve/resolved-dns-cache.c
@@ -426,7 +426,7 @@ int dns_cache_put(
return 0;
for (i = 0; i < answer->n_rrs; i++)
- dns_cache_remove(c, answer->rrs[i]->key);
+ dns_cache_remove(c, answer->items[i].rr->key);
/* We only care for positive replies and NXDOMAINs, on all
* other replies we will simply flush the respective entries,
@@ -443,7 +443,7 @@ int dns_cache_put(
/* Second, add in positive entries for all contained RRs */
for (i = 0; i < MIN(max_rrs, answer->n_rrs); i++) {
- r = dns_cache_put_positive(c, answer->rrs[i], timestamp, owner_family, owner_address);
+ r = dns_cache_put_positive(c, answer->items[i].rr, timestamp, owner_family, owner_address);
if (r < 0)
goto fail;
}
@@ -478,7 +478,7 @@ fail:
for (i = 0; i < q->n_keys; i++)
dns_cache_remove(c, q->keys[i]);
for (i = 0; i < answer->n_rrs; i++)
- dns_cache_remove(c, answer->rrs[i]->key);
+ dns_cache_remove(c, answer->items[i].rr->key);
return r;
}
@@ -566,7 +566,7 @@ int dns_cache_lookup(DnsCache *c, DnsQuestion *q, int *rcode, DnsAnswer **ret) {
j = hashmap_get(c->by_key, q->keys[i]);
LIST_FOREACH(by_key, j, j) {
if (j->rr) {
- r = dns_answer_add(answer, j->rr);
+ r = dns_answer_add(answer, j->rr, 0);
if (r < 0)
return r;
}