diff src/core/sat_main.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 6ec513ad92c2
children 8e0072754413
line wrap: on
line diff
--- a/src/core/sat_main.py	Wed Jun 25 14:01:58 2014 +0200
+++ b/src/core/sat_main.py	Mon Jun 23 00:44:10 2014 +0200
@@ -220,7 +220,7 @@
     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 @@
         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)