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
This commit is contained in:
souliane 2014-06-23 00:44:10 +02:00
commit d4eff5b99c

View file

@ -37,7 +37,9 @@ class SatXMPPClient(client.XMPPClient):
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