MCPcopy Create free account
hub / github.com/amule-project/amule / TryAnotherConnectionrequest

Method TryAnotherConnectionrequest

src/ServerConnect.cpp:55–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54
55void CServerConnect::TryAnotherConnectionrequest()
56{
57 if (m_recurseTryAnotherConnectionrequest) {
58 return;
59 }
60 if ( connectionattemps.size() < (unsigned)(( thePrefs::IsSafeServerConnectEnabled()) ? 1 : 2) ) {
61
62 CServer* next_server = used_list->GetNextServer(m_bTryObfuscated);
63
64 if ( thePrefs::AutoConnectStaticOnly() ) {
65 while (next_server && !next_server->IsStaticMember()) {
66 next_server = used_list->GetNextServer(m_bTryObfuscated);
67 }
68 }
69
70 if (!next_server) {
71 if ( connectionattemps.empty() ) {
72 m_recurseTryAnotherConnectionrequest = true;
73 if (m_bTryObfuscated && !thePrefs::IsClientCryptLayerRequired()){
74 AddLogLineC(_("Failed to connect to all obfuscated servers listed. Making another pass without obfuscation."));
75 // try all servers on the non-obfuscated port next
76 m_bTryObfuscated = false;
77 ConnectToAnyServer( false, true);
78 } else {
79 AddLogLineC(_("Failed to connect to all servers listed. Making another pass."));
80 ConnectToAnyServer( false );
81 }
82 m_recurseTryAnotherConnectionrequest = false;
83 }
84 return;
85 }
86
87 ConnectToServer(next_server, true, !m_bTryObfuscated);
88 }
89}
90
91void CServerConnect::ConnectToAnyServer(bool prioSort, bool bNoCrypt)
92{

Callers 1

OnCoreTimerMethod · 0.80

Calls 4

GetNextServerMethod · 0.80
IsStaticMemberMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected