From da4457401f8d3eb34ef099949c33cd3d784a7bdd Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 8 May 2005 16:50:56 +0000 Subject: [PATCH] apply Alexey's patch in order to be able not to use TLS connection --- src/common/xmpp/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/xmpp/client.py b/src/common/xmpp/client.py index 85bedd777..803c42cb4 100644 --- a/src/common/xmpp/client.py +++ b/src/common/xmpp/client.py @@ -167,12 +167,12 @@ class CommonClient: class Client(CommonClient): """ Example client class, based on CommonClient. """ - def connect(self,server=None,proxy=None): + def connect(self,server=None,proxy=None,tls=1): """ Connect to jabber server. If you want to specify different ip/port to connect to you can pass it as tuple as first parameter. If there is HTTP proxy between you and server - specify it's address and credentials (if needed) in the second argument. Example: connect(('192.168.5.5':5222),{'host':'proxy.my.net','port':8080,'user':'me','password':'secret'})""" - if not CommonClient.connect(self,server,proxy): return self.connected + if not CommonClient.connect(self,server,proxy) or not tls: return self.connected transports.TLS().PlugIn(self) if not self.Dispatcher.Stream._document_attrs.has_key('version') or not self.Dispatcher.Stream._document_attrs['version']=='1.0': return self.connected while not self.Dispatcher.Stream.features and self.Process(): pass # If we get version 1.0 stream the features tag MUST BE presented