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

Method UpdateClientHash

src/ClientList.cpp:173–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171
172
173void CClientList::UpdateClientHash( CUpDownClient* client, const CMD4Hash& newHash )
174{
175 // Sanity check
176 if ( ( client->GetClientState() != CS_LISTED ) || ( client->GetUserHash() == newHash ) )
177 return;
178
179
180 // Remove the old entry
181 RemoveHashFromList( client );
182
183 // And add the new one if valid
184 if ( !newHash.IsEmpty() ) {
185 m_hashList.insert( HashMapPair( newHash, CCLIENTREF(client, "CClientList::UpdateClientHash") ) );
186 }
187}
188
189
190bool CClientList::RemoveIDFromList( CUpDownClient* client )

Callers 1

SetUserHashMethod · 0.80

Calls 3

GetClientStateMethod · 0.80
insertMethod · 0.80
IsEmptyMethod · 0.45

Tested by

no test coverage detected