diff src/core/xmpp.py @ 1088:b29452cab50b

core, memory, plugins, stdui, frontends: look for DNS SRV records when server is not specified: - fix bug 3 - modify "Connection" params: - rename "Server" to "Force server" and "Port" to "Force port" - set the default value to empty string for both
author souliane <souliane@mailoo.org>
date Mon, 23 Jun 2014 00:44:10 +0200
parents 3700165d68dc
children 8e0072754413
line wrap: on
line diff
--- a/src/core/xmpp.py	Wed Jun 25 14:01:58 2014 +0200
+++ b/src/core/xmpp.py	Mon Jun 23 00:44:10 2014 +0200
@@ -37,7 +37,9 @@
     implements(iwokkel.IDisco)
 
     def __init__(self, host_app, profile, user_jid, password, host=None, port=5222):
-        client.XMPPClient.__init__(self, user_jid, password, host, port)
+        # XXX: DNS SRV records are checked when the host is not specified.
+        # If no SRV record is found, the host is directly extracted from the JID.
+        client.XMPPClient.__init__(self, user_jid, password, host or None, port or 5222)
         self.factory.clientConnectionLost = self.connectionLost
         self.__connected = False
         self.profile = profile