smb: use prettyname.kio-discovery-wsd for hostname of wsdiscoveries

Authored by sitter on Apr 2 2020, 12:17 PM.

Description

smb: use prettyname.kio-discovery-wsd for hostname of wsdiscoveries

Summary:
previously we simply used the ip address. this is fairly awkward though.
instead try to deduce a resolvable host name from the pretty name.

at discovery time we now mark wsdiscovieres for special handling

at listDir time we then attempt to resolve the name.local and if that
fails strip the .local to get the presumed LLMNR/netbios name. this means
the (first) listDir may be slower while we try to find a working hostname
but discovery is still as fast as possible.

Test Plan: wsdd on linux server resolves as expected, wsd on win10 also resolves as expected

Reviewers: ngraham, meven

Reviewed By: ngraham, meven

Subscribers: kossebau, kde-frameworks-devel, kfm-devel

Tags: Dolphin, Frameworks

Differential Revision: https://phabricator.kde.org/D28513

Details

Committed
sitterApr 6 2020, 9:25 AM
Reviewer
ngraham
Differential Revision
D28513: smb: use prettyname.kio-discovery-wsd for hostname of wsdiscoveries
Parents
R320:a2a8facc3979: import license copies via reuse
Branches
Unknown
Tags
Unknown