Skip to content

make sure that the ws-discovery client also works if a ws-discovery daemon is...

Lars Herschke requested to merge lhersch/kio-extras:ws_discovery into master

Make sure that the ws-discovery client also works if a ws-discovery daemon is already listening on port 3702.

Under Linux and BSD, the service wsdd often runs to make one's own shares known via WS-Discovery. This service must bind to port 3702 in order to function. The WS-Discovery client of kio-extras also wants to bind (temporarily) to this port. This fails when the wsdd service is running. The socket option SO_REUSEADDR (or QAbstractSocket::ShareAddress and/or QAbstractSocket::ReuseAddressHint) does not help with the bind call, because the wsdd service runs as root and the wsd-client in the context of the respective desktop user. However, a user may only reuse his own sockets. Only root may reuse sockets from other users. One could also immediately always bind to a random port. But then some people would have to readjust their firewall rules.

Merge request reports