# HG changeset patch # User Alain Mazy # Date 1655801857 -7200 # Node ID bafef43b6f37559e12dae80f30db001d587e26ae # Parent afa427f6544489020620451d74bef0bda9dc1a23 cppcheck diff -r afa427f65444 -r bafef43b6f37 OrthancServer/Sources/LuaScripting.cpp --- a/OrthancServer/Sources/LuaScripting.cpp Tue Jun 21 10:55:45 2022 +0200 +++ b/OrthancServer/Sources/LuaScripting.cpp Tue Jun 21 10:57:37 2022 +0200 @@ -865,9 +865,9 @@ LOG(INFO) << "Starting the Lua engine"; eventThread_ = boost::thread(EventThread, this); - LuaScripting::Lock lock(*this); + LuaScripting::Lock luaLock(*this); - if (heartBeatPeriod_ > 0 && lock.GetLua().IsExistingFunction("OnHeartBeat")) + if (heartBeatPeriod_ > 0 && luaLock.GetLua().IsExistingFunction("OnHeartBeat")) { LOG(INFO) << "Starting the Lua HeartBeat thread with a period of " << heartBeatPeriod_ << " seconds"; heartBeatThread_ = boost::thread(HeartBeatThread, this);