Add patch to remove aMule’s download limits.
[overlay.git] / net-p2p / amule / files / amule-2.2.6-remove-download-limit.patch
diff --git a/net-p2p/amule/files/amule-2.2.6-remove-download-limit.patch b/net-p2p/amule/files/amule-2.2.6-remove-download-limit.patch
new file mode 100644 (file)
index 0000000..a9a3bed
--- /dev/null
@@ -0,0 +1,30 @@
+diff -Nur aMule-2.2.6-orig/src/Preferences.cpp aMule-2.2.6/src/Preferences.cpp
+--- aMule-2.2.6-orig/src/Preferences.cpp       2009-03-28 20:29:59.000000000 +0100
++++ aMule-2.2.6/src/Preferences.cpp    2010-03-08 16:07:31.000000000 +0100
+@@ -1329,25 +1329,7 @@
+ // Kry note: of course, any leecher mod will be banned asap.
+ void CPreferences::CheckUlDlRatio()
+ {
+-      // Backwards compatibility
+-      if ( s_maxupload == 0xFFFF )
+-              s_maxupload = UNLIMITED;
+-
+-      // Backwards compatibility
+-      if ( s_maxdownload == 0xFFFF )
+-              s_maxdownload = UNLIMITED;
+-              
+-      if ( s_maxupload == UNLIMITED )
+-              return;
+-      
+-      // Enforce the limits
+-      if ( s_maxupload < 4  ) {
+-              if ( ( s_maxupload * 3 < s_maxdownload ) || ( s_maxdownload == 0 ) )
+-                      s_maxdownload = s_maxupload * 3 ;
+-      } else if ( s_maxupload < 10  ) {
+-              if ( ( s_maxupload * 4 < s_maxdownload ) || ( s_maxdownload == 0 ) )
+-                      s_maxdownload = s_maxupload * 4;
+-      }
++      s_maxdownload = UNLIMITED;
+ }