# HG changeset patch # User Sebastien Jodogne # Date 1481627592 -3600 # Node ID e7beca979562605c9b4a526b6c99ebdf316e454a # Parent 0fb6e04611051a1e9b248d9f363142e8269f4279 fix Windows build due to overwriting a macro diff -r 0fb6e0461105 -r e7beca979562 OrthancServer/OrthancFindRequestHandler.cpp --- a/OrthancServer/OrthancFindRequestHandler.cpp Tue Dec 13 11:43:35 2016 +0100 +++ b/OrthancServer/OrthancFindRequestHandler.cpp Tue Dec 13 12:13:12 2016 +0100 @@ -486,10 +486,10 @@ const std::string& remoteAet, const std::string& calledAet) { + static const char* LUA_CALLBACK = "IncomingFindRequestFilter"; + LuaScripting::Locker locker(context_.GetLua()); - static const char* CALLBACK = "IncomingFindRequestFilter"; - - if (!locker.GetLua().IsExistingFunction(CALLBACK)) + if (!locker.GetLua().IsExistingFunction(LUA_CALLBACK)) { return false; } @@ -500,7 +500,7 @@ origin["RemoteAet"] = remoteAet; origin["CalledAet"] = calledAet; - LuaFunctionCall call(locker.GetLua(), CALLBACK); + LuaFunctionCall call(locker.GetLua(), LUA_CALLBACK); call.PushDicom(source); call.PushJson(origin); FromDcmtkBridge::ExecuteToDicom(target, call); diff -r 0fb6e0461105 -r e7beca979562 OrthancServer/QueryRetrieveHandler.cpp --- a/OrthancServer/QueryRetrieveHandler.cpp Tue Dec 13 11:43:35 2016 +0100 +++ b/OrthancServer/QueryRetrieveHandler.cpp Tue Dec 13 12:13:12 2016 +0100 @@ -43,12 +43,12 @@ ServerContext& context, const std::string& modality) { + static const char* LUA_CALLBACK = "OutgoingFindRequestFilter"; + LuaScripting::Locker locker(context.GetLua()); - static const char* CALLBACK = "OutgoingFindRequestFilter"; - - if (locker.GetLua().IsExistingFunction(CALLBACK)) + if (locker.GetLua().IsExistingFunction(LUA_CALLBACK)) { - LuaFunctionCall call(locker.GetLua(), CALLBACK); + LuaFunctionCall call(locker.GetLua(), LUA_CALLBACK); call.PushDicom(query); call.PushJson(modality); FromDcmtkBridge::ExecuteToDicom(query, call);