Commit 3729db5e authored by Philipp Hörist's avatar Philipp Hörist

Revert "Correctly publish zeroconf txt data"

This reverts commit beaa82cf
parent b33636c0
......@@ -43,7 +43,7 @@ def __init__(self, new_serviceCB, remove_serviceCB, name_conflictCB,
self.port = port # listening port that gets announced
self.username = name
self.host = host
self.txt = {} # service data
self.txt = pybonjour.TXTRecord() # service data
# XXX these CBs should be set to None when we destroy the object
# (go offline), because they create a circular reference
......@@ -245,7 +245,7 @@ def create_service(self):
txt = {}
#remove empty keys
for key, val in self.txt.iteritems():
for key, val in self.txt:
if val:
txt[key] = val
......@@ -259,12 +259,13 @@ def create_service(self):
else:
txt['status'] = 'avail'
self.txt = pybonjour.TXTRecord(txt, strict=True)
try:
self.service_sdRef = pybonjour.DNSServiceRegister(
name=self.name,
regtype=self.stype,
port=self.port,
txtRecord=pybonjour.TXTRecord(txt),
txtRecord=self.txt,
callBack=self.service_added_callback)
log.info('Publishing service %s of type %s' % (self.name, self.stype))
......
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