Skip to content
Snippets Groups Projects
Commit 76f0672e authored by Adrien Béraud's avatar Adrien Béraud
Browse files

context: add statusCallback, certificateStore

parent ff6be819
No related branches found
No related tags found
No related merge requests found
...@@ -66,6 +66,8 @@ public: ...@@ -66,6 +66,8 @@ public:
struct Context { struct Context {
std::unique_ptr<Logger> logger {}; std::unique_ptr<Logger> logger {};
std::shared_ptr<PeerDiscovery> peerDiscovery {}; std::shared_ptr<PeerDiscovery> peerDiscovery {};
StatusCallback statusChangedCallback {};
CertificateStoreQuery certificateStore {};
Context() {} Context() {}
}; };
......
...@@ -114,6 +114,12 @@ DhtRunner::run(const SockAddr& local4, const SockAddr& local6, const DhtRunner:: ...@@ -114,6 +114,12 @@ DhtRunner::run(const SockAddr& local4, const SockAddr& local6, const DhtRunner::
if (context.logger and dht_via_proxy_) { if (context.logger and dht_via_proxy_) {
dht_via_proxy_->setLogger(*context.logger); dht_via_proxy_->setLogger(*context.logger);
} }
statusCb = std::move(context.statusChangedCallback);
if (context.certificateStore) {
dht_->setLocalCertificateStore(std::move(context.certificateStore));
if (dht_via_proxy_)
dht_via_proxy_->setLocalCertificateStore(std::move(context.certificateStore));
}
running = true; running = true;
if (not config.threaded) if (not config.threaded)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment