summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Nichols <tmnichols@gmail.com>2010-05-13 14:39:32 -0400
committerTom Nichols <tmnichols@gmail.com>2010-05-13 14:39:32 -0400
commit3f41fdd231998aeb68a7490f723d3c092bd7e380 (patch)
tree7ec6699cc4f04411aa710efdf7d6043826929764
parent8e95ae2948228ddc6d1b32eca2e64b847c756a71 (diff)
downloadslixmpp-3f41fdd231998aeb68a7490f723d3c092bd7e380.tar.gz
slixmpp-3f41fdd231998aeb68a7490f723d3c092bd7e380.tar.bz2
slixmpp-3f41fdd231998aeb68a7490f723d3c092bd7e380.tar.xz
slixmpp-3f41fdd231998aeb68a7490f723d3c092bd7e380.zip
fixed SRV query - should use dns.rdatatype.SRV
-rw-r--r--sleekxmpp/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sleekxmpp/__init__.py b/sleekxmpp/__init__.py
index 5ba38090..954ca996 100644
--- a/sleekxmpp/__init__.py
+++ b/sleekxmpp/__init__.py
@@ -31,6 +31,7 @@ from . import plugins
srvsupport = True
try:
import dns.resolver
+ import dns.rdatatype
except ImportError:
srvsupport = False
@@ -102,7 +103,8 @@ class ClientXMPP(basexmpp, XMLStream):
else:
logging.debug("Since no address is supplied, attempting SRV lookup.")
try:
- answers = dns.resolver.query("_xmpp-client._tcp.%s" % self.server)
+ answers = dns.resolver.query("_xmpp-client._tcp.%s" % self.domain,
+ dns.rdatatype.SRV )
except dns.resolver.NXDOMAIN:
logging.debug("No appropriate SRV record found. Using JID server name.")
else: