diff options
Diffstat (limited to 'Swiften/Network/PlatformDomainNameServiceQuery.cpp')
-rw-r--r-- | Swiften/Network/PlatformDomainNameServiceQuery.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Swiften/Network/PlatformDomainNameServiceQuery.cpp b/Swiften/Network/PlatformDomainNameServiceQuery.cpp index d6c87dc..659f397 100644 --- a/Swiften/Network/PlatformDomainNameServiceQuery.cpp +++ b/Swiften/Network/PlatformDomainNameServiceQuery.cpp @@ -19,20 +19,12 @@ #include "Swiften/Base/ByteArray.h" #include "Swiften/EventLoop/MainEventLoop.h" #include "Swiften/Base/foreach.h" using namespace Swift; -namespace { - struct SRVRecordPriorityComparator { - bool operator()(const DomainNameServiceQuery::Result& a, const DomainNameServiceQuery::Result& b) const { - return a.priority < b.priority; - } - }; -} - namespace Swift { PlatformDomainNameServiceQuery::PlatformDomainNameServiceQuery(const String& service) : thread(NULL), service(service), safeToJoin(true) { } PlatformDomainNameServiceQuery::~PlatformDomainNameServiceQuery() { @@ -162,13 +154,13 @@ void PlatformDomainNameServiceQuery::doRun() { currentEntry += entryLength; answersCount--; } #endif safeToJoin = true; - std::sort(records.begin(), records.end(), SRVRecordPriorityComparator()); + std::sort(records.begin(), records.end(), ResultPriorityComparator()); std::cout << "Sending out " << records.size() << " SRV results " << std::endl; MainEventLoop::postEvent(boost::bind(boost::ref(onResult), records)); } void PlatformDomainNameServiceQuery::emitError() { safeToJoin = true; |