Projects
Extra
aMule
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 41
View file
aMule.spec
Changed
@@ -1,6 +1,6 @@ Name: aMule Summary: Another eMule file-sharing program -Version: 2.3.1+git20160602.2010 +Version: 2.3.1+git20160607.0720 Release: 0 License: GPL-2.0+ Group: Productivity/Networking/Other
View file
update.diff.xz
Changed
@@ -129606,6 +129606,101 @@ static bool FindIPByNodeID(CKadClientSearcher& requester, const uint8_t *nodeID); static void CancelClientSearch(CKadClientSearcher& fromRequester); static bool IsRunningInLANMode(); +diff --git a/src/kademlia/kademlia/Search.cpp b/src/kademlia/kademlia/Search.cpp +index cb399b3..e60a354 100644 +--- a/src/kademlia/kademlia/Search.cpp ++++ b/src/kademlia/kademlia/Search.cpp +@@ -1054,64 +1054,35 @@ void CSearch::ProcessResultKeyword(const CUInt128& answer, TagPtrList *info) + return; + } + +- // the file name of the current search response is stored in "name" +- // the list of words the user entered is stored in "m_words" +- // so the file name now gets parsed for all the words entered by the user (even repetitive ones): +- +- // Step 1: Get the words of the response file name +- WordList listFileNameWords; +- CSearchManager::GetWords(name, &listFileNameWords, true); +- +- // Step 2: Look for each entered search word in those present in the filename +- bool bFileNameMatchesSearch = true; // this will be set to "false", if not all search words are found in the file name +- +- for (WordList::const_iterator itSearchWords = m_words.begin(); itSearchWords != m_words.end(); ++itSearchWords) { +- bool bSearchWordPresent = false; +- for (WordList::iterator itFileNameWords = listFileNameWords.begin(); itFileNameWords != listFileNameWords.end(); ++itFileNameWords) { +- if (!itFileNameWords->CmpNoCase(*itSearchWords)) { +- listFileNameWords.erase(itFileNameWords); // remove not to find same word twice +- bSearchWordPresent = true; +- break; // found word, go on using the next searched word +- } +- } +- if (!bSearchWordPresent) { +- bFileNameMatchesSearch = false; // not all search words were found in the file name +- break; +- } +- } +- +- // Step 3: Accept result only if all(!) words are found +- if (bFileNameMatchesSearch) { +- TagPtrList taglist; ++ TagPtrList taglist; + +- if (!format.IsEmpty()) { +- taglist.push_back(new CTagString(TAG_FILEFORMAT, format)); +- } +- if (!artist.IsEmpty()) { +- taglist.push_back(new CTagString(TAG_MEDIA_ARTIST, artist)); +- } +- if (!album.IsEmpty()) { +- taglist.push_back(new CTagString(TAG_MEDIA_ALBUM, album)); +- } +- if (!title.IsEmpty()) { +- taglist.push_back(new CTagString(TAG_MEDIA_TITLE, title)); +- } +- if (length) { +- taglist.push_back(new CTagVarInt(TAG_MEDIA_LENGTH, length)); +- } +- if (bitrate) { +- taglist.push_back(new CTagVarInt(TAG_MEDIA_BITRATE, bitrate)); +- } +- if (availability) { +- taglist.push_back(new CTagVarInt(TAG_SOURCES, availability)); +- } ++ if (!format.IsEmpty()) { ++ taglist.push_back(new CTagString(TAG_FILEFORMAT, format)); ++ } ++ if (!artist.IsEmpty()) { ++ taglist.push_back(new CTagString(TAG_MEDIA_ARTIST, artist)); ++ } ++ if (!album.IsEmpty()) { ++ taglist.push_back(new CTagString(TAG_MEDIA_ALBUM, album)); ++ } ++ if (!title.IsEmpty()) { ++ taglist.push_back(new CTagString(TAG_MEDIA_TITLE, title)); ++ } ++ if (length) { ++ taglist.push_back(new CTagVarInt(TAG_MEDIA_LENGTH, length)); ++ } ++ if (bitrate) { ++ taglist.push_back(new CTagVarInt(TAG_MEDIA_BITRATE, bitrate)); ++ } ++ if (availability) { ++ taglist.push_back(new CTagVarInt(TAG_SOURCES, availability)); ++ } + +- m_answers++; +- theApp->searchlist->KademliaSearchKeyword(m_searchID, &answer, name, size, type, publishInfo, taglist); ++ m_answers++; ++ theApp->searchlist->KademliaSearchKeyword(m_searchID, &answer, name, size, type, publishInfo, taglist); + +- // Free tags memory +- deleteTagPtrListEntries(&taglist); +- } ++ // Free tags memory ++ deleteTagPtrListEntries(&taglist); + } + + void CSearch::SendFindValue(CContact *contact, bool reaskMore) diff --git a/src/kademlia/net/KademliaUDPListener.cpp b/src/kademlia/net/KademliaUDPListener.cpp index 084eef5..e11dd5e 100644 --- a/src/kademlia/net/KademliaUDPListener.cpp
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.