diff options
author | Andrew Resch <andrewresch@gmail.com> | 2009-04-25 22:14:19 +0000 |
---|---|---|
committer | Andrew Resch <andrewresch@gmail.com> | 2009-04-25 22:14:19 +0000 |
commit | 5fb06630f20423ee9eb6a16e28b24c436caaa489 (patch) | |
tree | dd50a6a14fa877b104440c11ecf4d380eaa8947a | |
parent | 9bf27f1249b8b5bdb740249e74517ca62763a718 (diff) | |
download | deluge-5fb06630f20423ee9eb6a16e28b24c436caaa489.tar.gz deluge-5fb06630f20423ee9eb6a16e28b24c436caaa489.tar.bz2 deluge-5fb06630f20423ee9eb6a16e28b24c436caaa489.zip |
Add workaround for 'address_v4 from unsigned long' bug
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | deluge/core/torrent.py | 17 |
2 files changed, 17 insertions, 2 deletions
@@ -1,6 +1,8 @@ === Deluge 1.1.7 - (In Development) === ==== Core ==== * Fix issue where cannot resume torrent after doing a 'Pause All' + * Add workaround for 'address_v4 from unsigned long' bug experienced by users + with 64-bit machines. This bug is fixed in libtorrent 0.14.3. ==== GtkUI ==== * Fix #883 segfault if locale is not using UTF-8 encoding diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 5faa2fc52..16b1aaf7a 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -195,7 +195,14 @@ class Torrent: self.trackers.append(tracker) # Various torrent options - self.handle.resolve_countries(True) + # XXX: Disable resolve_countries if using a 64-bit long and on lt 0.14.2 or lower. + # This is a workaround for a bug in lt. + import sys + if sys.maxint > 0xFFFFFFFF and lt.version < "0.14.3.0": + self.handle.resolve_countries(False) + else: + self.handle.resolve_countries(True) + self.set_options(self.options) # Status message holds error info about the torrent @@ -697,7 +704,13 @@ class Torrent: self.handle.set_upload_limit(int(self.max_upload_speed * 1024)) self.handle.set_download_limit(int(self.max_download_speed * 1024)) self.handle.prioritize_files(self.file_priorities) - self.handle.resolve_countries(True) + # XXX: Disable resolve_countries if using a 64-bit long and on lt 0.14.2 or lower. + # This is a workaround for a bug in lt. + import sys + if sys.maxint > 0xFFFFFFFF and lt.version < "0.14.3.0": + self.handle.resolve_countries(False) + else: + self.handle.resolve_countries(True) def pause(self): """Pause this torrent""" |