Commit a042130e authored by Harald Sitter's avatar Harald Sitter 🌈
Browse files

smb: resolve potential dnssd names via kdnssd

as it turns out this is vastly more efficient for our purposes. we already
know that this address should only be a dnssd address, so we can ask our
dnssd daemon directly instead of taking on the entire weight of qhostinfo
and proper DNS resolution.
asking avahi directly reduces successful resolution time down from ~4 s
to ~4 ms (yes, ms!). on resolution failure the timing remains about
the same it seems
parent effb511c
......@@ -238,8 +238,8 @@ QUrl SMBSlave::checkURL(const QUrl &kurl_) const
QString host =;
const QString dnssd(host + ".local");
auto dnssdHost = QHostInfo::fromName(dnssd);
if (dnssdHost.error() == QHostInfo::NoError) {
auto dnssdHost = KDNSSD::ServiceBrowser::resolveHostName(dnssd);
if (!dnssdHost.isNull()) {
qCDebug(KIO_SMB_LOG) << "Resolved DNSSD name:" << dnssd;
host = dnssd;
} else {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment