aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: IsPartAvailable --- mem-examination  (Read 1871 times)

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
IsPartAvailable --- mem-examination
« on: June 09, 2004, 03:09:41 PM »

We all know this part.
Code: [Select]
(gdb) bt
#0  0x081187b3 in CUpDownClient::IsPartAvailable (this=0x8a87058, iPart=0)
    at updownclient.h:292
#1  0x081cc3c3 in CPartFile::UpdatePartsInfo (this=0x8849140)
    at PartFile.cpp:1905
#2  0x081151db in CUpDownClient::ProcessFileStatus (this=0x8892278,

However, if we examine the contents of the CUpDownClient, it seems clear that it's quite fucked:
Code: [Select]
(gdb) p *this
$15 = {socket = 0x8974380, credits = 0x8864f58, m_Friend = 0x8,
  compressiongain = 1, notcompressed = 10, m_bAddNextConnect = 4,
  sourcesslot = 11, reqfile = 0x1, m_bIsBotuser = false, m_dwUserIP = 1,
  m_dwServerIP = 81, m_nUserID = 1, m_nUserPort = 73, m_nServerPort = 0,
  m_nClientVersion = 1, m_cSendblock = 95, m_byEmuleVersion = 1 '\001',
  m_byDataCompVer = 0 '\0', m_SoftLen = 0 '\0', m_bEmuleProtocol = false,
  m_Username = , m_FullUserIP = ,
  m_UserHash = {
    m_hash = "W\000\000\000\001\000\000\000T\000\000\000\001\000\000"},
  m_HasValidHash = 78, m_nUDPPort = 0, m_byUDPVer = 1 '\001',
  m_bySourceExchangeVer = 0 '\0', m_byAcceptCommentVer = 0 '\0',
  m_byExtendedRequestsVer = 0 '\0', m_cFailed = 75 'K', m_clientSoft = 0 '\0',
  m_dwLastSourceRequest = 1, m_dwLastSourceAnswer = 90,
  m_dwLastAskedForSources = 1, m_iFileListRequested = 96, m_bFriendSlot = true,
  m_bCommentDirty = false, m_bIsHybrid = false, m_bIsNewMLD = false,
  m_bIsML = 86, m_bGPLEvildoer = false, m_bSupportsPreview = false,
  m_bPreviewReqPending = false, m_bPreviewAnsPending = true, m_nKadPort = 0,
  m_bMultiPacket = 91, m_SecureIdentState = IS_SIGNATURENEEDED,
  m_byInfopacketsReceived = 97 'a', m_dwLastSignatureIP = 1,
  m_bySupportSecIdent = 72 'H', m_byCompatibleClient = 1,
  m_WaitingPackets_list = {> = {head = 0x3f, tail = 0x1,
      count = 69}, },
  m_DontSwap_list = {
---Type to continue, or q to quit---
 >> = {, true>> = {_M_node = 0x1}, }, },
  m_lastRefreshedDLDisplay = 98, kBpsUp = 1.40129846e-45, msSentPrev = 122,
  m_bBanned = true, m_nTransferedUp = 99, m_nUploadState = 1 '\001',
  m_dwWaitTime = 115, m_dwUploadTime = 1, m_nMaxSendAllowed = 66, m_cAsked = 1,
  m_dwLastUpRequest = 68, m_dwBanTime = 1, m_bUsedComprUp = 83,
  m_nCurSessionUp = 1, m_nUpPartCount = 92, m_requpfileid = {
    m_hash = "\000\000\001\000\000\000M\000\000\000\001\000\000\000A"},
  m_nUpCompleteSourcesCount = 0,
  m_abyUpPartStatus = 0x1
, m_lastPartAsked = 82,
  m_dwEnteredConnectedState = 1, m_strModVersion = ,
  m_BlockSend_queue = {> = {head = 0x1, tail = 0x47,
      count = 1}, },
  m_BlockRequests_queue = {> = {head = 0x40, tail = 0x1, count = 100}, },
  m_DoneBlocks_list = {> = {head = 0x1, tail = 0x58, count = 1}, },
  m_RequestedFiles_list = {> = {head = 0x9, tail = 0x1, count = 89}, },
  m_bRemoteQueueFull = true, usedcompressiondown = false,
  m_nDownloadState = 0 '\0', m_nPartCount = 74, m_cDownAsked = 1,
  m_dwLastAskedTime = 74, ClientFilename = ,
  m_nTransferedDown = 162, m_bTransferredDownMini = true,
---Type to continue, or q to quit---
  m_dwDownStartTime = 94, m_nLastBlockOffset = 1, m_cShowDR = 93,
  m_dwLastBlockReceived = 1, m_nRemoteQueueRank = 76, m_nOldRemoteQueueRank = 0,
  m_bCompleteSource = true, m_bReaskPending = false, m_bUDPPending = false,
  m_bHashsetRequested = false,
  m_PendingBlocks_list = {> = {head = 0x70, tail = 0x1, count = 102}, },
  m_DownloadBlocks_list = {> = {head = 0x1, tail = 0x67, count = 1}, },
  kBpsDown = 9.38869971e-44, fDownAvgFilter = 1.40129846e-45,
  msReceivedPrev = 61, bytesReceivedCycle = 1, m_byChatstate = 70 'F',
  m_strComment = , m_iRate = 59 ';', m_fHashsetRequesting = 0,
  m_fNoViewSharedFiles = 0, m_fSupportsPreview = 0, m_fSentCancelTransfer = 0,
  m_fSharedDirectories = 0, m_bHelloAnswerPending = false,
  Extended_aMule_SO = 0 '\0', m_abyPartStatus = 0x1
,
  m_OtherRequests_list = {> = {head = 0x77,
      tail = 0x1, count = 85}, },
  m_OtherNoNeeded_list = {> = {head = 0x1,
      tail = 0x3c, count = 1}, }, m_ValidSource = 10,
  m_clientVerString = , SecIdentSupRec = 104, thief = true,
  leechertype = 464}
Logged