Match Queue Change
Moderator: Moderators
Match Queue Change
This is kind of hard to explain, but I'll do my best.
If I have several rar files in my quere (which are often divided into several files named .rar, .r00, .r01, .r02 etc and with the exact same size) and try to match someones queue to mine, it doesnt add the alternate user because it doesnt know which file is the same as which... You should change so that it checks the TTH for a match instead.
If I have several rar files in my quere (which are often divided into several files named .rar, .r00, .r01, .r02 etc and with the exact same size) and try to match someones queue to mine, it doesnt add the alternate user because it doesnt know which file is the same as which... You should change so that it checks the TTH for a match instead.
-
- Forum Moderator
- Posts: 366
- Joined: 2004-03-06 02:46
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
If I'm reading QueueManager::matchFiles() correctly, that is already what DC++ does: match queue by TTH.
Code: Select all
int QueueManager::matchFiles(DirectoryListing::Directory* dir) throw() {
int matches = 0;
for(DirectoryListing::Directory::Iter j = dir->directories.begin(); j != dir->directories.end(); ++j) {
if(!(*j)->getAdls())
matches += matchFiles(*j);
}
for(DirectoryListing::File::Iter i = dir->files.begin(); i != dir->files.end(); ++i) {
DirectoryListing::File* df = *i;
SizePair files = sizeMap.equal_range(adjustSize((u_int32_t)df->getSize(), df->getName()));
for(SizeIter j = files.first; j != files.second; ++j) {
QueueItem* qi = j->second;
bool equal = false;
if(qi->getTTH() != NULL && df->getTTH() != NULL) {
equal = (*qi->getTTH() == *df->getTTH());
} else {
if(Util::stricmp(utfEscaper(df->getName()), qi->getTargetFileName()) == 0) {
Hmmm... That's strange.... Are you sure?
I did an alternate search for a file, right clicked on it and selected match queue (because that was one of many files) and it downloaded his file list, but it didn't add the files to my queue, so I had to do every file (~40) manually.
I'm not that good at c++ so I didn't understand all of that code.... But all of the files I wanted to match had the exact same size and file extension as many other files in my queue... Does that maybe change anything?
Maybe I just did something wrong... I'm not sure right now as you've checked the code and all.... I'll just wait and see if the problem occurs again.
Thanks.
I did an alternate search for a file, right clicked on it and selected match queue (because that was one of many files) and it downloaded his file list, but it didn't add the files to my queue, so I had to do every file (~40) manually.
I'm not that good at c++ so I didn't understand all of that code.... But all of the files I wanted to match had the exact same size and file extension as many other files in my queue... Does that maybe change anything?
Maybe I just did something wrong... I'm not sure right now as you've checked the code and all.... I'll just wait and see if the problem occurs again.
Thanks.
-
- Forum Moderator
- Posts: 366
- Joined: 2004-03-06 02:46
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
Well, it confuses me, since you said the following initially:Cyborg wrote:But all of the files I wanted to match had the exact same size and file extension as many other files in my queue... Does that maybe change anything?
Do you understand what TTHes are?Cyborg wrote:You should change so that it checks the TTH for a match instead.
(Sorry for making the same point again, PH.)
"Do you understand what TTHes are? "
Yes, I do.
The thing is that I first thought that it only matched by size and file extension, but after you showed me that code and told me that it did match by TTH, I was uncertain whether it added the alternate sources or not. Now I think it did.
Btw, you should make it possible to activate the user account on the forums directly without having to get the activation mail (or if it already exists, you should have a link to it).
When I just changed my mail on this forum it sent me an activation mail and my ISP thought it was spam/junk and erased it without asking me.
Then I created a hotmail account and created this "TEMP_Cyborg" user and hotmail also moved the activation mail to the junk mail folder. Fortunately I could access the mail.
Please help me get my old account back.
Sorry 'bout this being really off-topic, but I didnt know where else to post it.
Yes, I do.
The thing is that I first thought that it only matched by size and file extension, but after you showed me that code and told me that it did match by TTH, I was uncertain whether it added the alternate sources or not. Now I think it did.
Btw, you should make it possible to activate the user account on the forums directly without having to get the activation mail (or if it already exists, you should have a link to it).
When I just changed my mail on this forum it sent me an activation mail and my ISP thought it was spam/junk and erased it without asking me.
Then I created a hotmail account and created this "TEMP_Cyborg" user and hotmail also moved the activation mail to the junk mail folder. Fortunately I could access the mail.
Please help me get my old account back.
Sorry 'bout this being really off-topic, but I didnt know where else to post it.
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
No changes to the forum are needed - this is stock phpBB, there's no need to customize it.TEMP_Cyborg wrote:"Do you understand what TTHes are? "
Yes, I do.
The thing is that I first thought that it only matched by size and file extension, but after you showed me that code and told me that it did match by TTH, I was uncertain whether it added the alternate sources or not. Now I think it did.
Btw, you should make it possible to activate the user account on the forums directly without having to get the activation mail (or if it already exists, you should have a link to it).
When I just changed my mail on this forum it sent me an activation mail and my ISP thought it was spam/junk and erased it without asking me.
Then I created a hotmail account and created this "TEMP_Cyborg" user and hotmail also moved the activation mail to the junk mail folder. Fortunately I could access the mail.
Please help me get my old account back.
Sorry 'bout this being really off-topic, but I didnt know where else to post it.
I've deleted your _TEMP account and put that email address in your main account, plus reactivated your account. If your passwords were different, you can get the forum to mail you a reminder or change it.