From 0692bd9bc925faf80f394eef9dfe0668da424832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Tue, 30 Apr 2019 11:27:04 -0400 Subject: [PATCH] proxy server: fix warning when building without push notifications --- src/dht_proxy_server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dht_proxy_server.cpp b/src/dht_proxy_server.cpp index 90fb18cb..744ba986 100644 --- a/src/dht_proxy_server.cpp +++ b/src/dht_proxy_server.cpp @@ -669,7 +669,6 @@ DhtProxyServer::put(const std::shared_ptr<restbed::Session>& session) clientId = pVal["client_id"].asString(); platform = pVal["platform"].asString(); } - bool isAndroid = platform == "android"; std::unique_lock<std::mutex> lock(schedulerLock_); scheduler_.syncTime(); auto timeout = scheduler_.time() + proxy::OP_TIMEOUT; @@ -684,6 +683,7 @@ DhtProxyServer::put(const std::shared_ptr<restbed::Session>& session) }); #ifdef OPENDHT_PUSH_NOTIFICATIONS if (not pushToken.empty()) { + bool isAndroid = platform == "android"; pput.expireNotifyJob = scheduler_.add(timeout - proxy::OP_MARGIN, [this, infoHash, vid, pushToken, clientId, isAndroid] { -- GitLab