Official eMule-Board: Some Possible Bugs In Kad Code - Official eMule-Board

Jump to content


Page 1 of 1

Some Possible Bugs In Kad Code

#1 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Post icon  Posted 14 May 2008 - 07:56 AM

Hi there!
Some of the issues were reported earlier but I cannot find the corresponding threads anymore and somehow they didn't get read or just ignored... anyways, I think it'd be good to fix them if I don't mix things up :flowers:

First of all:
Indexed.cpp @ Clean():

Quote

m_uTotalIndexSource = uTotalSource;
m_uTotalIndexKeyword = uTotalKey;

Is in fact wrong because we also count the (possibly) removed entries... thus, the correct code would be:

Quote

m_uTotalIndexSource = uTotalSource-uRemovedSource;
m_uTotalIndexKeyword = uTotalKey-uRemovedKey;



Indexed.cpp @ AddNotes():

Quote

m_uTotalIndexKeyword++;

Is most probably wrong and should be

Quote

++m_uTotalIndexNotes;

because we are adding NOTES in this function (note that this code is used twice).



Next in Search.cpp @ StorePacket():
I suppose that this:

Quote

// Inc total request answers
m_uAnswers++;

should be

Quote

// Inc total request answers
++m_uTotalRequestAnswers;

as the comment supposes... also appears twice...

Regards,
WiZ
0

#2 User is offline   Some Support 

  • Last eMule
  • PipPipPipPipPipPipPip
  • Group: Yes
  • Posts: 3632
  • Joined: 27-June 03

Posted 14 May 2008 - 08:39 AM

1 and 2 look indeed like old bugs - (while 1 was also already reported by an amule dev) . Fortunatly none of those will have any major effect. Number 3 is imho right the way it is now, but i would have to look closer into it to be completely sure.

Anyway thanks for potining out.

#3 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 13 April 2009 - 01:49 PM

I noticed they didn't get changed in 0.49c - any reason for that?
0

#4 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 13 May 2009 - 04:14 PM

^^ push - is noone reading here, anymore?
0

#5 User is offline   Some Support 

  • Last eMule
  • PipPipPipPipPipPipPip
  • Group: Yes
  • Posts: 3632
  • Joined: 27-June 03

Posted 13 May 2009 - 09:40 PM

According to the read counter, i can assure you that there are several persons reading this board. In case you mean "is some support not answering this post anymore", well, there isn't much to say about it.
Apperently i forgot to make myself a note and since those bugs were minor i forgot to fix it for the release. If i manange to make myself a note, i might be able to check it for the next release ;)

#6 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 14 May 2009 - 05:44 AM

View PostSome Support, on May 13 2009, 11:40 PM, said:

According to the read counter, i can assure you that there are several persons reading this board. In case you mean "is some support not answering this post anymore", well, there isn't much to say about it.

:respect: - I didn't want to be that straight but of course I hoped you would answer me as you are the only (visible/active) dev left :worthy:

Quote

Apperently i forgot to make myself a note and since those bugs were minor i forgot to fix it for the release. If i manange to make myself a note, i might be able to check it for the next release ;)

Great. I think it might not be THAT minor because if the counters aren't adjusted correctly one might end up indexing way too few entries, no? Maybe just on a long run but nontheless it's nice to have it changed. :thumbup:



EDiT && PS: may I suggest something like "Note-It" or do you prefer paper? :)

This post has been edited by tHeWiZaRdOfDoS: 14 May 2009 - 05:46 AM

0

#7 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 07 September 2013 - 08:36 AM

I want to ^^ PUSH ^^ this - may be nice to finally check & fix it in 0.50b :flowers:
I'm pretty sure all mentioned changes are valid - oh and additionally I suggest to apply that one to ~CIndexed, too:

Quote

...
delete pCurrSource;
}
delete pCurrSrcHash;
}

//>>> WiZaRd::MemLeak FiX
pos1 = m_mapLoad.GetStartPosition();
while (pos1 != NULL)
{
CCKey key1;
Load* pLoad;
m_mapLoad.GetNextAssoc(pos1, key1, pLoad);
delete pLoad;
}
//<<< WiZaRd::MemLeak FiX

pos1 = m_mapKeyword.GetStartPosition();
while (pos1 != NULL)
...

0

#8 User is offline   Some Support 

  • Last eMule
  • PipPipPipPipPipPipPip
  • Group: Yes
  • Posts: 3632
  • Joined: 27-June 03

Posted 09 September 2013 - 08:03 AM

Committed

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users