| 53 | |
| 54 | |
| 55 | void 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 | |
| 91 | void CServerConnect::ConnectToAnyServer(bool prioSort, bool bNoCrypt) |
| 92 | { |
no test coverage detected