Add the port to the mDNS description string. Permits clients to disambiguate multiple instances.

This commit is contained in:
Charles Haley 2014-08-17 15:32:51 +02:00
parent 60cd4ab85a
commit 8e580b926a

View File

@ -114,6 +114,9 @@ def create_service(desc, type, port, properties, add_hostname, use_ip_address=No
hostname = 'Unknown'
if add_hostname:
try:
desc += ' (on %s port %d)'%(hostname, port)
except:
try:
desc += ' (on %s)'%hostname
except: