Commit e1ae03d3 authored by dkirov's avatar dkirov
Browse files

better var names

parent 56cd8ba4
......@@ -71,6 +71,7 @@ def new_domain_callback(self,interface, protocol, domain, flags):
def check_jid(self, jid):
# TODO: at least miranda uses bad service names(only host name), so change them - probabaly not so nice... need to find a better solution
# [dkirov] maybe turn it into host+'@'+host, instead ?
if jid.find('@') == -1:
return 'bad-client@' + jid
......@@ -83,14 +84,15 @@ def recreate_bad_jid(self,jid):
return jid
def txt_array_to_dict(self,t):
l = {}
for s in t:
str = avahi.byte_array_to_string(s)
poseq = str.find('=')
l[str[:poseq]] = str[poseq+1:]
return l
def txt_array_to_dict(self,txt_array):
items = {}
for byte_array in txt_array:
# 'str' is used for string type in python
value = avahi.byte_array_to_string(byte_array)
poseq = value.find('=')
items[value[:poseq]] = value[poseq+1:]
return items
def service_resolved_callback(self, interface, protocol, name, stype, domain, host, aprotocol, address, port, txt, flags):
self.contacts[name] = (name, domain, interface, protocol, host, address, port, txt)
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