b2f6db4df986dbaa352effb0540cab33dc142321
[overlay.git] / net-p2p / amule / files / amule-2.2.6-remove-download-limit.patch
1 diff -Nur aMule-2.2.6-orig/src/Preferences.cpp aMule-2.2.6/src/Preferences.cpp
2 --- aMule-2.2.6-orig/src/Preferences.cpp        2009-03-28 20:29:59.000000000 +0100
3 +++ aMule-2.2.6/src/Preferences.cpp     2010-03-08 16:07:31.000000000 +0100
4 @@ -1329,25 +1329,7 @@
5  // Kry note: of course, any leecher mod will be banned asap.
6  void CPreferences::CheckUlDlRatio()
7  {
8 -       // Backwards compatibility
9 -       if ( s_maxupload == 0xFFFF )
10 -               s_maxupload = UNLIMITED;
11 -
12 -       // Backwards compatibility
13 -       if ( s_maxdownload == 0xFFFF )
14 -               s_maxdownload = UNLIMITED;
15 -               
16 -       if ( s_maxupload == UNLIMITED )
17 -               return;
18 -       
19 -       // Enforce the limits
20 -       if ( s_maxupload < 4  ) {
21 -               if ( ( s_maxupload * 3 < s_maxdownload ) || ( s_maxdownload == 0 ) )
22 -                       s_maxdownload = s_maxupload * 3 ;
23 -       } else if ( s_maxupload < 10  ) {
24 -               if ( ( s_maxupload * 4 < s_maxdownload ) || ( s_maxdownload == 0 ) )
25 -                       s_maxdownload = s_maxupload * 4;
26 -       }
27 +       s_maxdownload = UNLIMITED;
28  }
29  
30  
31 diff -Nur aMule-2.2.6-orig/src/PrefsUnifiedDlg.cpp aMule-2.2.6/src/PrefsUnifiedDlg.cpp
32 --- aMule-2.2.6-orig/src/PrefsUnifiedDlg.cpp    2009-03-28 20:29:59.000000000 +0100
33 +++ aMule-2.2.6/src/PrefsUnifiedDlg.cpp 2010-03-08 18:22:52.000000000 +0100
34 @@ -1087,25 +1087,6 @@
35  
36  void PrefsUnifiedDlg::OnRateLimitChanged( wxSpinEvent& event )
37  {
38 -       // Here we do immediate sainity checking of the up/down ratio,
39 -       // so that the user can see if his choice is illegal
40 -
41 -       // We only do checks if the rate is limited
42 -       if ( event.GetPosition() != (int)UNLIMITED ) {
43 -               wxSpinCtrl* dlrate = CastChild( IDC_MAXDOWN, wxSpinCtrl );
44 -       
45 -               if ( event.GetPosition() < 4 ) {
46 -                       if (    ( event.GetPosition() * 3 < dlrate->GetValue() ) ||
47 -                               ( dlrate->GetValue() == (int)UNLIMITED ) ) {
48 -                               dlrate->SetValue( event.GetPosition() * 3 );
49 -                       }
50 -               } else if ( event.GetPosition() < 10  ) {
51 -                       if (    ( event.GetPosition() * 4 < dlrate->GetValue() ) ||
52 -                               ( dlrate->GetValue() == (int)UNLIMITED ) ) {
53 -                               dlrate->SetValue( event.GetPosition() * 4 );
54 -                       }
55 -               }
56 -       }
57  }
58  
59