comparison OrthancServer/main.cpp @ 2612:6f9225dcfc32 jobs

renames
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 21 May 2018 08:59:04 +0200
parents 3ff4c50647ea
children 2f3007bf0708
comparison
equal deleted inserted replaced
2611:af7ea91dd4d5 2612:6f9225dcfc32
263 } 263 }
264 264
265 { 265 {
266 std::string lua = "Is" + configuration; 266 std::string lua = "Is" + configuration;
267 267
268 LuaScripting::Locker locker(context_.GetLua()); 268 LuaScripting::Locker locker(context_.GetLuaScripting());
269 269
270 if (locker.GetLua().IsExistingFunction(lua.c_str())) 270 if (locker.GetLua().IsExistingFunction(lua.c_str()))
271 { 271 {
272 LuaFunctionCall call(locker.GetLua(), lua.c_str()); 272 LuaFunctionCall call(locker.GetLua(), lua.c_str());
273 call.PushString(remoteAet); 273 call.PushString(remoteAet);
288 static const char* configuration = "UnknownSopClassAccepted"; 288 static const char* configuration = "UnknownSopClassAccepted";
289 289
290 { 290 {
291 std::string lua = "Is" + std::string(configuration); 291 std::string lua = "Is" + std::string(configuration);
292 292
293 LuaScripting::Locker locker(context_.GetLua()); 293 LuaScripting::Locker locker(context_.GetLuaScripting());
294 294
295 if (locker.GetLua().IsExistingFunction(lua.c_str())) 295 if (locker.GetLua().IsExistingFunction(lua.c_str()))
296 { 296 {
297 LuaFunctionCall call(locker.GetLua(), lua.c_str()); 297 LuaFunctionCall call(locker.GetLua(), lua.c_str());
298 call.PushString(remoteAet); 298 call.PushString(remoteAet);
334 return false; 334 return false;
335 } 335 }
336 336
337 static const char* HTTP_FILTER = "IncomingHttpRequestFilter"; 337 static const char* HTTP_FILTER = "IncomingHttpRequestFilter";
338 338
339 LuaScripting::Locker locker(context_.GetLua()); 339 LuaScripting::Locker locker(context_.GetLuaScripting());
340 340
341 // Test if the instance must be filtered out 341 // Test if the instance must be filtered out
342 if (locker.GetLua().IsExistingFunction(HTTP_FILTER)) 342 if (locker.GetLua().IsExistingFunction(HTTP_FILTER))
343 { 343 {
344 LuaFunctionCall call(locker.GetLua(), HTTP_FILTER); 344 LuaFunctionCall call(locker.GetLua(), HTTP_FILTER);
650 std::string path = Configuration::InterpretStringParameterAsPath(*it); 650 std::string path = Configuration::InterpretStringParameterAsPath(*it);
651 LOG(WARNING) << "Installing the Lua scripts from: " << path; 651 LOG(WARNING) << "Installing the Lua scripts from: " << path;
652 std::string script; 652 std::string script;
653 SystemToolbox::ReadFile(script, path); 653 SystemToolbox::ReadFile(script, path);
654 654
655 LuaScripting::Locker locker(context.GetLua()); 655 LuaScripting::Locker locker(context.GetLuaScripting());
656 locker.GetLua().Execute(script); 656 locker.GetLua().Execute(script);
657 } 657 }
658 } 658 }
659 659
660 660
687 { 687 {
688 context.GetPlugins().SignalOrthancStarted(); 688 context.GetPlugins().SignalOrthancStarted();
689 } 689 }
690 #endif 690 #endif
691 691
692 context.GetLua().Execute("Initialize"); 692 context.GetLuaScripting().Execute("Initialize");
693 693
694 bool restart; 694 bool restart;
695 695
696 for (;;) 696 for (;;)
697 { 697 {
721 { 721 {
722 break; 722 break;
723 } 723 }
724 } 724 }
725 725
726 context.GetLua().Execute("Finalize"); 726 context.GetLuaScripting().Execute("Finalize");
727 727
728 #if ORTHANC_ENABLE_PLUGINS == 1 728 #if ORTHANC_ENABLE_PLUGINS == 1
729 if (context.HasPlugins()) 729 if (context.HasPlugins())
730 { 730 {
731 context.GetPlugins().SignalOrthancStopped(); 731 context.GetPlugins().SignalOrthancStopped();