14 Oct 2006 15:38
Bug with searching for files by TTH
Edward J. Sheldrake <ejs1920 <at> yahoo.co.uk>
2006-10-14 13:38:29 GMT
2006-10-14 13:38:29 GMT
While trying to add support for ADCGet and TTHF to dclib/valknut 0.3.7, I have discovered a serious bug which causes files to not be found when searched for by their TTH. I have confirmed the bug occurrs when you rename a file that has already been hashed and is in your share, but there may be other cases which trigger the bug. When a file is searched for by TTH, but not found as it should be, I have discovered that the following happens: CSearchIndex::SearchHash is called CSearchIndex::FindHash is then called, and finds a value CSearchIndex::HashBaseIndexFromHashIndex converts this value into another (often the same) CSearchIndex::BaseIndexFromHashBaseIndex then fails But I'm thinking the problem lies in the code for adding the values to the various indexes (*.bin files in ~/.dc/). So far, I have only managed to add extra debugging statements to dclib, I haven't been able to make any progress in fixing this problem. A patch for the extra debugging output is available here: http://www.dcs.warwick.ac.uk/~csucda/extra-debug-dclib.diff We need to fix this bug because DC++ >= 0.696 will require support for ADCGet and TTHF, so we need to fix this bug for valknut to have any future. --(Continue reading)
RSS Feed