Add workaround for 'address_v4 from unsigned long' bug

This commit is contained in:
Andrew Resch 2009-04-25 22:14:19 +00:00
commit 5fb06630f2
2 changed files with 17 additions and 2 deletions

View file

@ -1,6 +1,8 @@
=== Deluge 1.1.7 - (In Development) === === Deluge 1.1.7 - (In Development) ===
==== Core ==== ==== Core ====
* Fix issue where cannot resume torrent after doing a 'Pause All' * 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 ==== ==== GtkUI ====
* Fix #883 segfault if locale is not using UTF-8 encoding * Fix #883 segfault if locale is not using UTF-8 encoding

View file

@ -195,7 +195,14 @@ class Torrent:
self.trackers.append(tracker) self.trackers.append(tracker)
# Various torrent options # 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) self.set_options(self.options)
# Status message holds error info about the torrent # 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_upload_limit(int(self.max_upload_speed * 1024))
self.handle.set_download_limit(int(self.max_download_speed * 1024)) self.handle.set_download_limit(int(self.max_download_speed * 1024))
self.handle.prioritize_files(self.file_priorities) 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): def pause(self):
"""Pause this torrent""" """Pause this torrent"""