summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-18 18:50:50 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-18 18:50:50 (GMT)
commit312a114c7e204cfe4cfe961509ab9b24ccde7860 (patch)
tree7649aba8b50de49f5259709ee3d34b035d83b33b /Swiften/Network/PlatformDomainNameServiceQuery.h
parent790dd3e97c6634f6a256f2e072507b9d5f29348b (diff)
downloadswift-312a114c7e204cfe4cfe961509ab9b24ccde7860.zip
swift-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.h11
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;
};
}