summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-zone.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-08-22 01:57:58 +0200
committerTom Gundersen <teg@jklm.no>2015-08-22 01:57:58 +0200
commit72aa2c2a2083362afda9f09805563848d54e31df (patch)
tree418b0e257bec66fc0816bd30800cc9d616206dea /src/resolve/resolved-dns-zone.c
parent28b967a87bfa83815ae97e80c02f637a5dd3f454 (diff)
parent26b1c471cdddedf1bb9aebf10f4c3073bdf7a29e (diff)
Merge pull request #1010 from poettering/resolved-question-key
only maintain one question RR key per transaction and other fixes
Diffstat (limited to 'src/resolve/resolved-dns-zone.c')
-rw-r--r--src/resolve/resolved-dns-zone.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/resolve/resolved-dns-zone.c b/src/resolve/resolved-dns-zone.c
index 99d96c3f40..fc212f48f4 100644
--- a/src/resolve/resolved-dns-zone.c
+++ b/src/resolve/resolved-dns-zone.c
@@ -166,7 +166,6 @@ static int dns_zone_link_item(DnsZone *z, DnsZoneItem *i) {
static int dns_zone_item_probe_start(DnsZoneItem *i) {
_cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;
- _cleanup_(dns_question_unrefp) DnsQuestion *question = NULL;
DnsTransaction *t;
int r;
@@ -179,17 +178,9 @@ static int dns_zone_item_probe_start(DnsZoneItem *i) {
if (!key)
return -ENOMEM;
- question = dns_question_new(1);
- if (!question)
- return -ENOMEM;
-
- r = dns_question_add(question, key);
- if (r < 0)
- return r;
-
- t = dns_scope_find_transaction(i->scope, question, false);
+ t = dns_scope_find_transaction(i->scope, key, false);
if (!t) {
- r = dns_transaction_new(&t, i->scope, question);
+ r = dns_transaction_new(&t, i->scope, key);
if (r < 0)
return r;
}
@@ -217,7 +208,6 @@ static int dns_zone_item_probe_start(DnsZoneItem *i) {
}
dns_zone_item_ready(i);
-
return 0;
gc: