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

Method ProcessHashSet

src/DownloadClient.cpp:572–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

570/* eMule 0.30c implementation, i give it a try (Creteil) END ... */
571
572void CUpDownClient::ProcessHashSet(const uint8_t* packet, uint32 size)
573{
574 if ((!m_reqfile) || md4cmp(packet,m_reqfile->GetFileHash().GetHash())) {
575 throw wxString("Wrong fileid sent (ProcessHashSet)");
576 }
577 if (!m_fHashsetRequesting) {
578 throw wxString("Received unsolicited hashset, ignoring it.");
579 }
580 CMemFile data(packet,size);
581 if (m_reqfile->LoadHashsetFromFile(&data,true)) {
582 m_fHashsetRequesting = 0;
583 } else {
584 m_reqfile->SetHashSetNeeded(true);
585 throw wxString("Corrupted or invalid hashset received");
586 }
587 SendStartupLoadReq();
588}
589
590void CUpDownClient::SendBlockRequests()
591{

Callers 1

ProcessPacketMethod · 0.80

Calls 5

md4cmpFunction · 0.85
LoadHashsetFromFileMethod · 0.80
SetHashSetNeededMethod · 0.80
wxStringClass · 0.70
GetHashMethod · 0.45

Tested by

no test coverage detected