Skip to content
Snippets Groups Projects
Commit ba2b1a0f authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

change function name. see #2898

parent 24a4ee24
No related branches found
No related tags found
No related merge requests found
......@@ -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('', [])
......
......@@ -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 = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment