comparison 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
comparison
equal deleted inserted replaced
1087:b3b7a2863060 1088:b29452cab50b
218 218
219 @defer.inlineCallbacks 219 @defer.inlineCallbacks
220 def _connectXMPPClient(self, profile): 220 def _connectXMPPClient(self, profile):
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("Port", "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 = 5222
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("Server", "Connection", profile_key=profile), port) 231 password, self.memory.getParamA(C.FORCE_SERVER_PARAM, "Connection", profile_key=profile), port)
232 232
233 current.messageProt = xmpp.SatMessageProtocol(self) 233 current.messageProt = xmpp.SatMessageProtocol(self)
234 current.messageProt.setHandlerParent(current) 234 current.messageProt.setHandlerParent(current)
235 235
236 current.roster = xmpp.SatRosterProtocol(self) 236 current.roster = xmpp.SatRosterProtocol(self)