updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / amule-adnza / svn_fixes.patch
blob198b55e743ceda6732f379dc3d742ed0bc780a63
1 diff -ur aMule-AdunanzA-2010.1-2.2.6/src/ClientTCPSocket.cpp amule-adunanza//src/ClientTCPSocket.cpp
2 --- aMule-AdunanzA-2010.1-2.2.6/src/ClientTCPSocket.cpp 2010-02-03 18:14:39.000000000 +0100
3 +++ amule-adunanza//src/ClientTCPSocket.cpp 2010-04-13 21:32:02.333156656 +0200
4 @@ -1117,6 +1117,28 @@
5 throw wxString(wxT("Client send extended packet before finishing handshake"));
7 */
8 +// ADUNANZA BEGIN
9 + // probabile casino con KADU opcode (anche se pensavo riguardassero solo l'UDP...) in caso di connessioni offuscate
10 + // Notare che a questo punto posso solo essere sicuro dell'IP (potrebbe essere un pacchetto AdunanzA ma potrei
11 + // non aver ancora concluso "l'handshaking"), scelgo quindi di scartare tutti i pacchetti da rete Fastweb
12 + // con opcode kadOpcode o kadZOpcode.
13 + // Questo rientra nella categoria "tapulli" (= soluzione temporanea di emergenza!)
15 + // bool bSkipMe(false);
16 + // std::wclog << L"Mr Hyde DBG: IP <" << m_client->GetFullIP() << L"> opcode <" << opcode << L"> size " << size << std::endl;
17 + if (thePrefs::IsClientCryptLayerSupported() && thePrefs::IsClientCryptLayerRequested() && thePrefs::IsClientCryptLayerRequired()) {
18 + if ((opcode == theApp->get_kadOpcode()) || (opcode == theApp->get_kadZOpcode())) {
19 + if (m_client->IsFastweb()) {
20 + // std::wclog << L"Mr Hyde DBG: skip TCP extended packet (ADU opcode) IP <" << m_client->GetFullIP() << L"> opcode <" << opcode << L"> size " << size << std::endl;
21 + theStats::AddDownOverheadOther(size);
22 + return true;
25 + // bSkipMe = true;
26 + }
27 + }
28 + }
29 +// ADUNANZA END
30 switch(opcode) {
31 case OP_MULTIPACKET_EXT:
32 AddDebugLogLineM( false, logRemoteClient, wxT("Remote Client: OP_MULTIPACKET_EXT from ") + m_client->GetFullIP());
33 diff -ur aMule-AdunanzA-2010.1-2.2.6/src/DownloadQueue.cpp amule-adunanza//src/DownloadQueue.cpp
34 --- aMule-AdunanzA-2010.1-2.2.6/src/DownloadQueue.cpp 2010-02-03 18:14:39.000000000 +0100
35 +++ amule-adunanza//src/DownloadQueue.cpp 2010-04-13 21:32:02.349823603 +0200
36 @@ -89,6 +89,11 @@
37 m_dwNextTCPSrcReq = 0;
38 m_cRequestsSentToServer = 0;
39 m_lastDiskCheck = 0;
40 +// ADUNANZA BEGIN
41 +// Per ripartitore di banda di Tiger (credo)
42 + m_ADU_ext_datarate = 0;
43 + m_ADU_kadu_datarate = 0;
44 +// ADUNANZA END
45 SetLastKademliaFileRequest();
48 @@ -412,7 +417,10 @@
49 if (theMaxDownload != UNLIMITED) { // probabilmente inutile, messo per sicurezza
50 extMaxDown = std::min<uint64>(theMaxDownload, extMaxDown);
53 ADU_ext_downspeed = (((uint32)extMaxDown)*1024*100)/(m_ADU_ext_datarate+1);
54 + // ADU_ext_downspeed = (uint32)((extMaxDown*1024*100)/(m_ADU_ext_datarate+1));
56 if (ADU_ext_downspeed < 50) {
57 ADU_ext_downspeed = 50;
58 } else if (ADU_ext_downspeed > 200) {
59 @@ -422,12 +430,19 @@
62 uint32 ADU_kadu_downspeed = 0;
64 uint64 kaduMaxDown = thePrefs::ADU_GetKaduMaxDown();
65 if ( kaduMaxDown != UNLIMITED && m_ADU_kadu_datarate > 1500) {
66 if (theMaxDownload != UNLIMITED) {// probabilmente inutile, messo per sicurezza
67 kaduMaxDown = std::min<uint64>(theMaxDownload, kaduMaxDown);
69 - ADU_kadu_downspeed = (((uint32)kaduMaxDown)*1024*100)/(m_ADU_kadu_datarate+1);
70 + ADU_kadu_downspeed = (((uint32)kaduMaxDown)*1024*100)/(m_ADU_kadu_datarate+1);
71 + /*
72 + uint32 num = (uint32) (kaduMaxDown*1024*100);
73 + uint32 denum = (1+m_ADU_kadu_datarate);
74 + ADU_kadu_downspeed = (num > denum) ? (num/denum) : 0;
75 + */
77 if (ADU_kadu_downspeed < 50) {
78 ADU_kadu_downspeed = 50;
79 } else if (ADU_kadu_downspeed > 200) {
81 diff -ur aMule-AdunanzA-2010.1-2.2.6/src/webserver/src/WebServer.h amule-adunanza//src/webserver/src/WebServer.h
82 --- aMule-AdunanzA-2010.1-2.2.6/src/webserver/src/WebServer.h 2010-02-03 18:14:39.000000000 +0100
83 +++ amule-adunanza//src/webserver/src/WebServer.h 2010-04-13 21:32:01.382324912 +0200
84 @@ -154,7 +154,15 @@
85 class SearchFile {
86 public:
87 wxString sFileName;
88 +// ADUNANZA BEGIN
89 +// Patch di Taganaka per bugfix su ricerche file di dimensioni
90 +// maggiori di 4 giga
91 +#if 0
92 unsigned long lFileSize;
93 +#else
94 + uint64 lFileSize;
95 +#endif
96 +// ADUNANZA END
97 CMD4Hash nHash;
98 wxString sHash;
99 long lSourceCount;