| 481 | |
| 482 | |
| 483 | void CClientList::AddTrackClient(CUpDownClient* toadd) |
| 484 | { |
| 485 | std::map<uint32, CDeletedClient*>::iterator it = m_trackedClientsList.find( toadd->GetIP() ); |
| 486 | |
| 487 | if ( it != m_trackedClientsList.end() ) { |
| 488 | CDeletedClient* pResult = it->second; |
| 489 | |
| 490 | pResult->m_dwInserted = ::GetTickCount64(); |
| 491 | |
| 492 | CDeletedClient::PaHList::iterator it2 = pResult->m_ItemsList.begin(); |
| 493 | for ( ; it2 != pResult->m_ItemsList.end(); ++it2 ) { |
| 494 | if ( it2->nPort == toadd->GetUserPort() ) { |
| 495 | // already tracked, update |
| 496 | it2->pHash = toadd->GetCreditsHash(); |
| 497 | return; |
| 498 | } |
| 499 | } |
| 500 | |
| 501 | // New client for that IP, add an entry |
| 502 | CDeletedClient::PortAndHash porthash = { toadd->GetUserPort(), toadd->GetCreditsHash()}; |
| 503 | pResult->m_ItemsList.push_back(porthash); |
| 504 | } else { |
| 505 | m_trackedClientsList[ toadd->GetIP() ] = new CDeletedClient(toadd); |
| 506 | } |
| 507 | } |
| 508 | |
| 509 | |
| 510 | uint16 CClientList::GetClientsFromIP(uint32 dwIP) |
no test coverage detected