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>
diff --git a/crow/include/crow/http_server.h b/crow/include/crow/http_server.h
index 31b8ec2..36bab51 100644
--- a/crow/include/crow/http_server.h
+++ b/crow/include/crow/http_server.h
@@ -126,17 +126,17 @@
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)
{