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

proxy server: fix warning when building without push notifications

parent 7f48c480
No related branches found
No related tags found
No related merge requests found
...@@ -669,7 +669,6 @@ DhtProxyServer::put(const std::shared_ptr<restbed::Session>& session) ...@@ -669,7 +669,6 @@ DhtProxyServer::put(const std::shared_ptr<restbed::Session>& session)
clientId = pVal["client_id"].asString(); clientId = pVal["client_id"].asString();
platform = pVal["platform"].asString(); platform = pVal["platform"].asString();
} }
bool isAndroid = platform == "android";
std::unique_lock<std::mutex> lock(schedulerLock_); std::unique_lock<std::mutex> lock(schedulerLock_);
scheduler_.syncTime(); scheduler_.syncTime();
auto timeout = scheduler_.time() + proxy::OP_TIMEOUT; auto timeout = scheduler_.time() + proxy::OP_TIMEOUT;
...@@ -684,6 +683,7 @@ DhtProxyServer::put(const std::shared_ptr<restbed::Session>& session) ...@@ -684,6 +683,7 @@ DhtProxyServer::put(const std::shared_ptr<restbed::Session>& session)
}); });
#ifdef OPENDHT_PUSH_NOTIFICATIONS #ifdef OPENDHT_PUSH_NOTIFICATIONS
if (not pushToken.empty()) { if (not pushToken.empty()) {
bool isAndroid = platform == "android";
pput.expireNotifyJob = scheduler_.add(timeout - proxy::OP_MARGIN, pput.expireNotifyJob = scheduler_.add(timeout - proxy::OP_MARGIN,
[this, infoHash, vid, pushToken, clientId, isAndroid] [this, infoHash, vid, pushToken, clientId, isAndroid]
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment