comparison src/core/sat_main.py @ 1089:8e0072754413

core, plugins, stdui, frontends: fixes handling of "Force server" and "Force port" parameters: - do not save a "guessed" value, they must stay empty until the user explicitely sets them - add constant XMPP_C2S_PORT (default value 5222)
author souliane <souliane@mailoo.org>
date Mon, 23 Jun 2014 10:23:13 +0200
parents b29452cab50b
children 0eefc74c346b
comparison
equal deleted inserted replaced
1088:b29452cab50b 1089:8e0072754413
221 """This part is called from asyncConnect when we have loaded individual parameters from memory""" 221 """This part is called from asyncConnect when we have loaded individual parameters from memory"""
222 try: 222 try:
223 port = int(self.memory.getParamA(C.FORCE_PORT_PARAM, "Connection", profile_key=profile)) 223 port = int(self.memory.getParamA(C.FORCE_PORT_PARAM, "Connection", profile_key=profile))
224 except ValueError: 224 except ValueError:
225 log.error(_("Can't parse port value, using default value")) 225 log.error(_("Can't parse port value, using default value"))
226 port = 5222 226 port = None # will use default value 5222 or be retrieved from a DNS SRV record
227 227
228 password = yield self.memory.asyncGetParamA("Password", "Connection", profile_key=profile) 228 password = yield self.memory.asyncGetParamA("Password", "Connection", profile_key=profile)
229 current = self.profiles[profile] = xmpp.SatXMPPClient(self, profile, 229 current = self.profiles[profile] = xmpp.SatXMPPClient(self, profile,
230 jid.JID(self.memory.getParamA("JabberID", "Connection", profile_key=profile)), 230 jid.JID(self.memory.getParamA("JabberID", "Connection", profile_key=profile)),
231 password, self.memory.getParamA(C.FORCE_SERVER_PARAM, "Connection", profile_key=profile), port) 231 password, self.memory.getParamA(C.FORCE_SERVER_PARAM, "Connection", profile_key=profile), port)