change function name. see #2898

This commit is contained in:
Yann Leboulanger 2007-01-17 11:40:59 +00:00
parent 24a4ee24ba
commit ba2b1a0f58
2 changed files with 5 additions and 3 deletions

View File

@ -349,8 +349,10 @@ class Connection(ConnectionHandlers):
self._hosts = [ {'host': h, 'port': p, 'prio': 10, 'weight': 10} ]
self._hostname = hostname
if use_srv:
# add request for srv query to the resolve, on result '_on_resolve' will be called
gajim.resolver.resolve('_xmpp-client._tcp.' + helpers.unicode_to_ACE(h), self._on_resolve)
# add request for srv query to the resolve, on result '_on_resolve'
# will be called
gajim.resolver.resolve('_xmpp-client._tcp.' + helpers.idn_to_ascii(h),
self._on_resolve)
else:
self._on_resolve('', [])

View File

@ -86,7 +86,7 @@ def parse_jid(jidstring):
return prep(*decompose_jid(jidstring))
def unicode_to_ACE(host):
def idn_to_ascii(host):
'''convert IDN (Internationalized Domain Names) to ACE (ASCII-compatible encoding)'''
labels = idna.dots.split(host)
converted_labels = []