Advertisement
Guest User

Untitled

a guest
May 9th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. diff --git a/butterfly/connection.py b/butterfly/connection.py
  2. index bc56fd1..7439b70 100644
  3. --- a/butterfly/connection.py
  4. +++ b/butterfly/connection.py
  5. @@ -49,6 +49,7 @@ class ButterflyConnection(telepathy.server.Connection,
  6. _optional_parameters = {
  7. 'server' : 's',
  8. 'port' : 'q',
  9. + 'http-pooling' : 'b',
  10. 'http-proxy-server' : 's',
  11. 'http-proxy-port' : 'q',
  12. 'http-proxy-username' : 's',
  13. @@ -60,7 +61,8 @@ class ButterflyConnection(telepathy.server.Connection,
  14. }
  15. _parameter_defaults = {
  16. 'server' : 'messenger.hotmail.com',
  17. - 'port' : 1863
  18. + 'port' : 1863,
  19. + 'http-pooling' : False
  20. }
  21.  
  22. def __init__(self, manager, parameters):
  23. @@ -80,7 +82,10 @@ class ButterflyConnection(telepathy.server.Connection,
  24. proxies['https'] = proxy
  25.  
  26. self._manager = weakref.proxy(manager)
  27. - self._msn_client = pymsn.Client(server, proxies)
  28. + if parameters['http-pooling']:
  29. + self._msn_client = pymsn.Client(server, proxies, transport_class=HTTPPollConnection)
  30. + else:
  31. + self._msn_client = pymsn.Client(server, proxies)
  32. self._account = (parameters['account'].encode('utf-8'),
  33. parameters['password'].encode('utf-8'))
  34. self._channel_manager = ChannelManager(self)
  35. diff --git a/data/butterfly.manager b/data/butterfly.manager
  36. index 5d42219..2b949c0 100644
  37. --- a/data/butterfly.manager
  38. +++ b/data/butterfly.manager
  39. @@ -8,6 +8,7 @@ param-account = s required
  40. param-password = s required
  41. param-server = s
  42. param-port = q
  43. +param-http-pooling = b
  44. param-http-proxy-server = s
  45. param-http-proxy-port = q
  46. param-http-proxy-username = s
  47. @@ -18,3 +19,4 @@ param-https-proxy-username = s
  48. param-https-proxy-password = s
  49. default-server = messenger.hotmail.com
  50. default-port = 1863
  51. +default-http-pooling = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement