Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/butterfly/connection.py b/butterfly/connection.py
- index bc56fd1..7439b70 100644
- --- a/butterfly/connection.py
- +++ b/butterfly/connection.py
- @@ -49,6 +49,7 @@ class ButterflyConnection(telepathy.server.Connection,
- _optional_parameters = {
- 'server' : 's',
- 'port' : 'q',
- + 'http-pooling' : 'b',
- 'http-proxy-server' : 's',
- 'http-proxy-port' : 'q',
- 'http-proxy-username' : 's',
- @@ -60,7 +61,8 @@ class ButterflyConnection(telepathy.server.Connection,
- }
- _parameter_defaults = {
- 'server' : 'messenger.hotmail.com',
- - 'port' : 1863
- + 'port' : 1863,
- + 'http-pooling' : False
- }
- def __init__(self, manager, parameters):
- @@ -80,7 +82,10 @@ class ButterflyConnection(telepathy.server.Connection,
- proxies['https'] = proxy
- self._manager = weakref.proxy(manager)
- - self._msn_client = pymsn.Client(server, proxies)
- + if parameters['http-pooling']:
- + self._msn_client = pymsn.Client(server, proxies, transport_class=HTTPPollConnection)
- + else:
- + self._msn_client = pymsn.Client(server, proxies)
- self._account = (parameters['account'].encode('utf-8'),
- parameters['password'].encode('utf-8'))
- self._channel_manager = ChannelManager(self)
- diff --git a/data/butterfly.manager b/data/butterfly.manager
- index 5d42219..2b949c0 100644
- --- a/data/butterfly.manager
- +++ b/data/butterfly.manager
- @@ -8,6 +8,7 @@ param-account = s required
- param-password = s required
- param-server = s
- param-port = q
- +param-http-pooling = b
- param-http-proxy-server = s
- param-http-proxy-port = q
- param-http-proxy-username = s
- @@ -18,3 +19,4 @@ param-https-proxy-username = s
- param-https-proxy-password = s
- default-server = messenger.hotmail.com
- default-port = 1863
- +default-http-pooling = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement