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: 86bb09c93b ('dns: generate correct search domain for hostnames on non-public TLD')
This commit is contained in:
Thomas Haller
2023-05-02 11:25:36 +02:00
parent 86bb09c93b
commit b4338de984

View File

@@ -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;