Remove all changes to upload and download rates.
[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 18:46:08.000000000 +0100
4 @@ -1329,25 +1329,6 @@
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  }
28  
29  
30 diff -Nur aMule-2.2.6-orig/src/PrefsUnifiedDlg.cpp aMule-2.2.6/src/PrefsUnifiedDlg.cpp
31 --- aMule-2.2.6-orig/src/PrefsUnifiedDlg.cpp    2009-03-28 20:29:59.000000000 +0100
32 +++ aMule-2.2.6/src/PrefsUnifiedDlg.cpp 2010-03-08 18:22:52.000000000 +0100
33 @@ -1087,25 +1087,6 @@
34  
35  void PrefsUnifiedDlg::OnRateLimitChanged( wxSpinEvent& event )
36  {
37 -       // Here we do immediate sainity checking of the up/down ratio,
38 -       // so that the user can see if his choice is illegal
39 -
40 -       // We only do checks if the rate is limited
41 -       if ( event.GetPosition() != (int)UNLIMITED ) {
42 -               wxSpinCtrl* dlrate = CastChild( IDC_MAXDOWN, wxSpinCtrl );
43 -       
44 -               if ( event.GetPosition() < 4 ) {
45 -                       if (    ( event.GetPosition() * 3 < dlrate->GetValue() ) ||
46 -                               ( dlrate->GetValue() == (int)UNLIMITED ) ) {
47 -                               dlrate->SetValue( event.GetPosition() * 3 );
48 -                       }
49 -               } else if ( event.GetPosition() < 10  ) {
50 -                       if (    ( event.GetPosition() * 4 < dlrate->GetValue() ) ||
51 -                               ( dlrate->GetValue() == (int)UNLIMITED ) ) {
52 -                               dlrate->SetValue( event.GetPosition() * 4 );
53 -                       }
54 -               }
55 -       }
56  }
57  
58