Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#221 Is this a bug?

open
nobody
None
5
2014-04-17
2010-03-02
lingqi wang
No

Is this a bug?
see: tthread_dht.handler_publish_keyFile

for example:
this dht ID : closer enough to [aaaa] keyword sha1 so send to this dht node

A: keyword :[aaaa] file sha1: 0123456789abcdef
B: keywords :[aaaa] [bb] file sha1: 0123456789abcdef
C: keywords :[aaaa] [cc] file sha1: 0123456789abcdef
A and B and C target file have same sha1 value

pfile:=DHT_FindKeywordFile; ----------------------not find A's file, B's file and C's file found
if pfile<>nil then begin
pfile^.lastSeen:=time_now;

if pfile^.ip<>fromIP then begin
pfile^.ip:=FromIP;
if pfile^.count<100 then inc(pfile^.count);
end;
pfile^.port:=tcpport;
result:=true;
exit; ----------------B and C stop at here!!!
end;

A' keyword can be parsed but B and C's keywords will not be parsed .

when some one search with keywords [aaaa] [bb] or [aaaa] [cc], because [aaaa] is longgest keyword . this search will find this dhtnode, there will find no result!

Discussion