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

@ -220,7 +220,7 @@ class SAT(service.Service):
def _connectXMPPClient(self, profile):
"""This part is called from asyncConnect when we have loaded individual parameters from memory"""
try:
port = int(self.memory.getParamA("Port", "Connection", profile_key=profile))
port = int(self.memory.getParamA(C.FORCE_PORT_PARAM, "Connection", profile_key=profile))
except ValueError:
log.error(_("Can't parse port value, using default value"))
port = 5222
@ -228,7 +228,7 @@ class SAT(service.Service):
password = yield self.memory.asyncGetParamA("Password", "Connection", profile_key=profile)
current = self.profiles[profile] = xmpp.SatXMPPClient(self, profile,
jid.JID(self.memory.getParamA("JabberID", "Connection", profile_key=profile)),
password, self.memory.getParamA("Server", "Connection", profile_key=profile), port)
password, self.memory.getParamA(C.FORCE_SERVER_PARAM, "Connection", profile_key=profile), port)
current.messageProt = xmpp.SatMessageProtocol(self)
current.messageProt.setHandlerParent(current)