comparison src/core/xmpp.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 fe102b4cf275
comparison
equal deleted inserted replaced
1088:b29452cab50b 1089:8e0072754413
34 34
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=C.XMPP_C2S_PORT):
40 # XXX: DNS SRV records are checked when the host is not specified. 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. 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) 42 client.XMPPClient.__init__(self, user_jid, password, host or None, port or C.XMPP_C2S_PORT)
43 self.factory.clientConnectionLost = self.connectionLost 43 self.factory.clientConnectionLost = self.connectionLost
44 self.__connected = False 44 self.__connected = False
45 self.profile = profile 45 self.profile = profile
46 self.host_app = host_app 46 self.host_app = host_app
47 self.conn_deferred = defer.Deferred() 47 self.conn_deferred = defer.Deferred()