Mercurial > hg > orthanc
comparison OrthancServer/LuaScripting.cpp @ 4036:c6e82885f570
merge
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 10 Jun 2020 10:28:15 +0200 |
parents | 058b5ade8acd |
children |
comparison
equal
deleted
inserted
replaced
4035:cc6ed76bba27 | 4036:c6e82885f570 |
---|---|
40 | 40 |
41 #include "../Core/HttpServer/StringHttpOutput.h" | 41 #include "../Core/HttpServer/StringHttpOutput.h" |
42 #include "../Core/Logging.h" | 42 #include "../Core/Logging.h" |
43 #include "../Core/Lua/LuaFunctionCall.h" | 43 #include "../Core/Lua/LuaFunctionCall.h" |
44 | 44 |
45 #include <EmbeddedResources.h> | 45 #include <OrthancServerResources.h> |
46 | 46 |
47 | 47 |
48 namespace Orthanc | 48 namespace Orthanc |
49 { | 49 { |
50 class LuaScripting::IEvent : public IDynamicObject | 50 class LuaScripting::IEvent : public IDynamicObject |
905 | 905 |
906 void LuaScripting::LoadGlobalConfiguration() | 906 void LuaScripting::LoadGlobalConfiguration() |
907 { | 907 { |
908 OrthancConfiguration::ReaderLock configLock; | 908 OrthancConfiguration::ReaderLock configLock; |
909 | 909 |
910 lua_.Execute(Orthanc::EmbeddedResources::LUA_TOOLBOX); | 910 { |
911 std::string command; | |
912 Orthanc::ServerResources::GetFileResource(command, Orthanc::ServerResources::LUA_TOOLBOX); | |
913 lua_.Execute(command); | |
914 } | |
911 | 915 |
912 std::list<std::string> luaScripts; | 916 std::list<std::string> luaScripts; |
913 configLock.GetConfiguration().GetListOfStringsParameter(luaScripts, "LuaScripts"); | 917 configLock.GetConfiguration().GetListOfStringsParameter(luaScripts, "LuaScripts"); |
914 | 918 |
915 LuaScripting::Lock lock(*this); | 919 LuaScripting::Lock lock(*this); |