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

Method ProcessHelloPacket

src/BaseClient.cpp:361–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361bool CUpDownClient::ProcessHelloPacket(const uint8_t* pachPacket, uint32 nSize)
362{
363 const CMemFile data(pachPacket,nSize);
364 uint8 hashsize = data.ReadUInt8();
365 if ( 16 != hashsize ) {
366 /*
367 * Hint: We can not accept other sizes here because:
368 * - the magic number is spread all over the source
369 * - the answer packet lacks the size field
370 */
371 throw wxString("Invalid Hello packet: Other userhash sizes than 16 are not implemented");
372 }
373 // eMule 0.42: reset all client properties; a client may not send a particular emule tag any longer
374 ClearHelloProperties();
375
376 return ProcessHelloTypePacket(data);
377}
378
379void CUpDownClient::Safe_Delete()
380{

Callers 1

ProcessPacketMethod · 0.80

Calls 2

ReadUInt8Method · 0.80
wxStringClass · 0.70

Tested by

no test coverage detected