From dcc8c6e4c35a35c5f8a775781ecc92a9b3e35cb9 Mon Sep 17 00:00:00 2001 From: Konrad Date: Thu, 13 Apr 2017 13:31:32 +0200 Subject: [PATCH] Changed: Using PeersHandler::mRsPeers instead of rsPeers --- libresapi/src/api/PeersHandler.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libresapi/src/api/PeersHandler.cpp b/libresapi/src/api/PeersHandler.cpp index 14cd1b7c6..8473bce04 100644 --- a/libresapi/src/api/PeersHandler.cpp +++ b/libresapi/src/api/PeersHandler.cpp @@ -539,13 +539,13 @@ void PeersHandler::handleGetPGPOptions(Request& req, Response& resp) RsPgpId pgp(pgp_id); RsPeerDetails detail; - if(!rsPeers->getGPGDetails(pgp, detail)) + if(!mRsPeers->getGPGDetails(pgp, detail)) { resp.setFail(); return; } - std::string pgp_key = rsPeers->getPGPKey(detail.gpg_id, false); + std::string pgp_key = mRsPeers->getPGPKey(detail.gpg_id, false); resp.mDataStream << makeKeyValue("pgp_fingerprint", detail.fpr.toStdString()); resp.mDataStream << makeKeyValueReference("pgp_key", pgp_key); @@ -560,7 +560,7 @@ void PeersHandler::handleGetPGPOptions(Request& req, Response& resp) uint32_t max_upload_speed = 0; uint32_t max_download_speed = 0; - rsPeers->getPeerMaximumRates(pgp, max_upload_speed, max_download_speed); + mRsPeers->getPeerMaximumRates(pgp, max_upload_speed, max_download_speed); resp.mDataStream << makeKeyValueReference("maxUploadSpeed", max_upload_speed); resp.mDataStream << makeKeyValueReference("maxDownloadSpeed", max_download_speed); @@ -573,7 +573,7 @@ void PeersHandler::handleGetPGPOptions(Request& req, Response& resp) for(std::list::const_iterator it(detail.gpgSigners.begin()); it != detail.gpgSigners.end(); ++it) { RsPeerDetails detail; - if(!rsPeers->getGPGDetails(*it, detail)) + if(!mRsPeers->getGPGDetails(*it, detail)) continue; std::string pgp_id = (*it).toStdString(); @@ -595,7 +595,7 @@ void PeersHandler::handleSetPGPOptions(Request& req, Response& resp) RsPgpId pgp(pgp_id); RsPeerDetails detail; - if(!rsPeers->getGPGDetails(pgp, detail)) + if(!mRsPeers->getGPGDetails(pgp, detail)) { resp.setFail(); return; @@ -605,7 +605,7 @@ void PeersHandler::handleSetPGPOptions(Request& req, Response& resp) req.mStream << makeKeyValueReference("trustLvl", trustLvl); if(trustLvl != (int)detail.trustLvl) - rsPeers->trustGPGCertificate(pgp, trustLvl); + mRsPeers->trustGPGCertificate(pgp, trustLvl); int max_upload_speed; int max_download_speed; @@ -613,7 +613,7 @@ void PeersHandler::handleSetPGPOptions(Request& req, Response& resp) req.mStream << makeKeyValueReference("max_upload_speed", max_upload_speed); req.mStream << makeKeyValueReference("max_download_speed", max_download_speed); - rsPeers->setPeerMaximumRates(pgp, (uint32_t)max_upload_speed, (uint32_t)max_download_speed); + mRsPeers->setPeerMaximumRates(pgp, (uint32_t)max_upload_speed, (uint32_t)max_download_speed); bool direct_transfer; bool allow_push; @@ -632,13 +632,13 @@ void PeersHandler::handleSetPGPOptions(Request& req, Response& resp) if(require_WL) flags = flags | RS_NODE_PERM_REQUIRE_WL; - rsPeers->setServicePermissionFlags(pgp, flags); + mRsPeers->setServicePermissionFlags(pgp, flags); bool own_sign; req.mStream << makeKeyValueReference("own_sign", own_sign); if(own_sign) - rsPeers->signGPGCertificate(pgp); + mRsPeers->signGPGCertificate(pgp); resp.mStateToken = getCurrentStateToken();