summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarri Devender Rao <devenrao@in.ibm.com>2019-04-04 09:33:34 +0300
committerMarri Devender Rao <devenrao@in.ibm.com>2019-04-08 16:22:25 +0300
commit92e07bff901704475f4b91b21f2cb17b3fe171d2 (patch)
tree737f8647ab0d862ee423e72729960121b691da42
parent48e4639e3ee4284e6ea686b30d8f476a7d3e7bb6 (diff)
downloadbmcweb-92e07bff901704475f4b91b21f2cb17b3fe171d2.tar.xz
Redfish: Local variable overriding member variable
timer handler local variable defined in run() method is overriding handler member variable. Tested: 1) Verified BMC web is running and able to process requests Change-Id: I6cd80dff16f3a932d8ada4fcf00917488e8ea936 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
-rw-r--r--crow/include/crow/http_server.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/crow/include/crow/http_server.h b/crow/include/crow/http_server.h
index 31b8ec2d04..36bab51438 100644
--- a/crow/include/crow/http_server.h
+++ b/crow/include/crow/http_server.h
@@ -126,17 +126,17 @@ class Server
boost::asio::deadline_timer timer(*ioService);
timer.expires_from_now(boost::posix_time::seconds(1));
- std::function<void(const boost::system::error_code& ec)> handler;
- handler = [&](const boost::system::error_code& ec) {
+ std::function<void(const boost::system::error_code& ec)> timerHandler;
+ timerHandler = [&](const boost::system::error_code& ec) {
if (ec)
{
return;
}
timerQueue.process();
timer.expires_from_now(boost::posix_time::seconds(1));
- timer.async_wait(handler);
+ timer.async_wait(timerHandler);
};
- timer.async_wait(handler);
+ timer.async_wait(timerHandler);
if (tickFunction && tickInterval.count() > 0)
{