diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-05 20:27:29 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-05 20:27:29 +0100 |
commit | 105f6c4bdcdd9c7233370f1bc143913d5ab0d099 (patch) | |
tree | 09f2c9eaf89d127731f807cb03e6a0b9b429d729 /src/resolve | |
parent | 3eb6aa009dd0b64dc2b326acaa38821462b8c6bf (diff) |
resolved: when dumping trust anchor contents, clarify when it is empty
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/resolved-dns-trust-anchor.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/resolve/resolved-dns-trust-anchor.c b/src/resolve/resolved-dns-trust-anchor.c index 53b49b091a..0f34695696 100644 --- a/src/resolve/resolved-dns-trust-anchor.c +++ b/src/resolve/resolved-dns-trust-anchor.c @@ -346,15 +346,21 @@ static void dns_trust_anchor_dump(DnsTrustAnchor *d) { assert(d); - log_info("Positive Trust Anchors:"); - HASHMAP_FOREACH(a, d->positive_by_key, i) { - DnsResourceRecord *rr; - - DNS_ANSWER_FOREACH(rr, a) - log_info("%s", dns_resource_record_to_string(rr)); + if (hashmap_isempty(d->positive_by_key)) + log_info("No positive trust anchors defined."); + else { + log_info("Positive Trust Anchors:"); + HASHMAP_FOREACH(a, d->positive_by_key, i) { + DnsResourceRecord *rr; + + DNS_ANSWER_FOREACH(rr, a) + log_info("%s", dns_resource_record_to_string(rr)); + } } - if (!set_isempty(d->negative_by_name)) { + if (set_isempty(d->negative_by_name)) + log_info("No negative trust anchors defined."); + else { char *n; log_info("Negative trust anchors:"); |