# HG changeset patch # User Goffi # Date 1355677310 -3600 # Node ID 626e85e46d7c0ec520692738da0f319233f6e130 # Parent 4f856dd4c0d09a0c46383411c9cafe832a30d674 core: port parameter is used diff -r 4f856dd4c0d0 -r 626e85e46d7c src/core/sat_main.py --- a/src/core/sat_main.py Sun Dec 16 18:01:06 2012 +0100 +++ b/src/core/sat_main.py Sun Dec 16 18:01:50 2012 +0100 @@ -26,7 +26,6 @@ from twisted.application import service from twisted.internet import defer -from twisted.internet.defer import inlineCallbacks, returnValue from twisted.words.protocols.jabber import jid, xmlstream from twisted.words.xish import domish @@ -224,10 +223,16 @@ def afterMemoryInit(ignore): """This part must be called when we have loaded individual parameters from memory""" + try: + port = int(self.memory.getParamA("Port", "Connection", profile_key = profile)) + except ValueError: + error(_("Can't parse port value, using default value")) + port = 5222 current = self.profiles[profile] = xmpp.SatXMPPClient(self, profile, jid.JID(self.memory.getParamA("JabberID", "Connection", profile_key = profile), profile), self.memory.getParamA("Password", "Connection", profile_key = profile), - self.memory.getParamA("Server", "Connection", profile_key = profile), 5222) + self.memory.getParamA("Server", "Connection", profile_key = profile), + port) current.messageProt = xmpp.SatMessageProtocol(self) current.messageProt.setHandlerParent(current)