diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-12-18 18:50:50 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-12-18 18:50:50 (GMT) |
commit | 312a114c7e204cfe4cfe961509ab9b24ccde7860 (patch) | |
tree | 7649aba8b50de49f5259709ee3d34b035d83b33b /Swiften/Network/PlatformDomainNameServiceQuery.h | |
parent | 790dd3e97c6634f6a256f2e072507b9d5f29348b (diff) | |
download | swift-contrib-312a114c7e204cfe4cfe961509ab9b24ccde7860.zip swift-contrib-312a114c7e204cfe4cfe961509ab9b24ccde7860.tar.bz2 |
Move all domain name resolve queries into one thread.
This avoids reentrancy problems on some platform DNS calls.
Resolves: #443
Diffstat (limited to 'Swiften/Network/PlatformDomainNameServiceQuery.h')
-rw-r--r-- | Swiften/Network/PlatformDomainNameServiceQuery.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Swiften/Network/PlatformDomainNameServiceQuery.h b/Swiften/Network/PlatformDomainNameServiceQuery.h index 9808196..c9dbd65 100644 --- a/Swiften/Network/PlatformDomainNameServiceQuery.h +++ b/Swiften/Network/PlatformDomainNameServiceQuery.h @@ -6,31 +6,28 @@ #pragma once -#include <boost/thread.hpp> #include <boost/enable_shared_from_this.hpp> #include "Swiften/Network/DomainNameServiceQuery.h" #include "Swiften/EventLoop/EventOwner.h" #include "Swiften/Base/String.h" +#include <Swiften/Network/PlatformDomainNameQuery.h> namespace Swift { class EventLoop; - class PlatformDomainNameServiceQuery : public DomainNameServiceQuery, public boost::enable_shared_from_this<PlatformDomainNameServiceQuery>, public EventOwner { + class PlatformDomainNameServiceQuery : public DomainNameServiceQuery, public PlatformDomainNameQuery, public boost::enable_shared_from_this<PlatformDomainNameServiceQuery>, public EventOwner { public: - PlatformDomainNameServiceQuery(const String& service, EventLoop* eventLoop); - ~PlatformDomainNameServiceQuery(); + PlatformDomainNameServiceQuery(const String& service, EventLoop* eventLoop, PlatformDomainNameResolver* resolver); virtual void run(); private: - void doRun(); + void runBlocking(); void emitError(); private: EventLoop* eventLoop; - boost::thread* thread; String service; - bool safeToJoin; }; } |