comparison src/core/xmpp.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 3700165d68dc
children 8e0072754413
comparison
equal deleted inserted replaced
1087:b3b7a2863060 1088:b29452cab50b
35 35
36 class SatXMPPClient(client.XMPPClient): 36 class SatXMPPClient(client.XMPPClient):
37 implements(iwokkel.IDisco) 37 implements(iwokkel.IDisco)
38 38
39 def __init__(self, host_app, profile, user_jid, password, host=None, port=5222): 39 def __init__(self, host_app, profile, user_jid, password, host=None, port=5222):
40 client.XMPPClient.__init__(self, user_jid, password, host, port) 40 # XXX: DNS SRV records are checked when the host is not specified.
41 # If no SRV record is found, the host is directly extracted from the JID.
42 client.XMPPClient.__init__(self, user_jid, password, host or None, port or 5222)
41 self.factory.clientConnectionLost = self.connectionLost 43 self.factory.clientConnectionLost = self.connectionLost
42 self.__connected = False 44 self.__connected = False
43 self.profile = profile 45 self.profile = profile
44 self.host_app = host_app 46 self.host_app = host_app
45 self.conn_deferred = defer.Deferred() 47 self.conn_deferred = defer.Deferred()