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
Branches
Tags
No related merge requests found
......@@ -66,6 +66,8 @@ public:
struct Context {
std::unique_ptr<Logger> logger {};
std::shared_ptr<PeerDiscovery> peerDiscovery {};
StatusCallback statusChangedCallback {};
CertificateStoreQuery certificateStore {};
Context() {}
};
......
......@@ -114,6 +114,12 @@ DhtRunner::run(const SockAddr& local4, const SockAddr& local6, const DhtRunner::
if (context.logger and dht_via_proxy_) {
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;
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