changeset 2221:e7beca979562

fix Windows build due to overwriting a macro
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 13 Dec 2016 12:13:12 +0100
parents 0fb6e0461105
children 21713ce8717b
files OrthancServer/OrthancFindRequestHandler.cpp OrthancServer/QueryRetrieveHandler.cpp
diffstat 2 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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);
--- 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);