Author: andar

Revision: 5170

Log:
        Add workaround for 'address_v4 from unsigned long' bug

Diff:
Modified: branches/1.1.0_RC/ChangeLog
===================================================================
--- branches/1.1.0_RC/ChangeLog 2009-04-25 21:11:44 UTC (rev 5169)
+++ branches/1.1.0_RC/ChangeLog 2009-04-25 22:14:19 UTC (rev 5170)
@@ -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

Modified: branches/1.1.0_RC/deluge/core/torrent.py
===================================================================
--- branches/1.1.0_RC/deluge/core/torrent.py    2009-04-25 21:11:44 UTC (rev 
5169)
+++ branches/1.1.0_RC/deluge/core/torrent.py    2009-04-25 22:14:19 UTC (rev 
5170)
@@ -195,7 +195,14 @@
                 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 @@
         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"""



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to