///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
| 1133 | |
| 1134 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 1135 | FSecure::C3::Core::Profiler::Agent* FSecure::C3::Core::Profiler::Gateway::ReAddAgent(AgentId agentId, BuildId buildId, FSecure::Crypto::PublicKey encryptionKey, bool isBanned, int32_t firstSeen, int32_t lastSeen, HostInfo hostInfo) |
| 1136 | { |
| 1137 | auto build = m_AgentBuilds.find(buildId); |
| 1138 | if (build == m_AgentBuilds.cend()) |
| 1139 | throw std::runtime_error{ "Tried to add agent with unknown buildId" }; |
| 1140 | if (build->second.m_IsBanned) |
| 1141 | return nullptr; |
| 1142 | auto agent = m_Agents.Add(agentId, Agent{ m_Owner, agentId, buildId, encryptionKey, isBanned, firstSeen, lastSeen, build->second.m_IsX64, std::move(hostInfo) }); |
| 1143 | agent->AddScheduledDevice(0u, build->second.m_StartupCmd); |
| 1144 | return agent; |
| 1145 | } |
| 1146 | |
| 1147 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 1148 | FSecure::C3::Core::Profiler::Agent* FSecure::C3::Core::Profiler::Gateway::ReAddRemoteAgent(RouteId childRouteId, BuildId buildId, FSecure::Crypto::PublicKey encryptionKey, RouteId ridOfConectionPlace, HashT childGrcHash, int32_t firstSeen, int32_t lastSeen, HostInfo hostInfo) |
no test coverage detected