summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-05-02 11:25:36 +0200
committerThomas Haller <thaller@redhat.com>2023-05-02 11:40:33 +0200
commitb4338de9844d5b80b0df3b8f95d61fb8b1af639b (patch)
treeec3df4862c91f77768e6566a0d5540359168ad24
parent86bb09c93be39d5a8c6602cdfb7958bde5c29059 (diff)
downloadNetworkManager-b4338de9844d5b80b0df3b8f95d61fb8b1af639b.tar.gz
dns: fix logging for resetting the host-domain
The previous logging happened, when the value did not change. Log instead, when the value changes. Fixes: 86bb09c93be3 ('dns: generate correct search domain for hostnames on non-public TLD')
-rw-r--r--src/core/dns/nm-dns-manager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/dns/nm-dns-manager.c b/src/core/dns/nm-dns-manager.c
index e4181de30a..d321379ae0 100644
--- a/src/core/dns/nm-dns-manager.c
+++ b/src/core/dns/nm-dns-manager.c
@@ -2157,10 +2157,10 @@ nm_dns_manager_set_hostname(NMDnsManager *self, const char *hostname, gboolean s
}
}
- if (!nm_strdup_reset(&priv->hostdomain, domain)) {
- _LOGT("Established |%s| as host domain.", priv->hostdomain);
+ if (!nm_strdup_reset(&priv->hostdomain, domain))
return;
- }
+
+ _LOGT("set host domain to %s%s%s", NM_PRINT_FMT_QUOTE_STRING(priv->hostdomain));
if (skip_update)
return;