build: toInfoHash->to

This commit is contained in:
Sébastien Blin committed 2017-11-08 15:07:04 -05:00
1 parent 4430b1e616
commit 65e88f2fa6
1 file changed
+1 -1
+1 -1
View File
@@ -322,7 +322,7 @@ DhtProxyServer::putEncrypted(const std::shared_ptr<restbed::Session>& session) c
std::string strJson(buf.begin(), buf.end());
bool parsingSuccessful = reader.parse(strJson.c_str(), root);
InfoHash to(root["to"].asString());
if (parsingSuccessful && toInfoHash) {
if (parsingSuccessful && to) {
auto value = std::make_shared<Value>(root);
Json::FastWriter writer;
dht_->putEncrypted(key, to, value);