comparison OrthancServer/OrthancFindRequestHandler.cpp @ 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 3eefb84ac0bd
children a3a65de1840f
comparison
equal deleted inserted replaced
2220:0fb6e0461105 2221:e7beca979562
484 const DicomMap& source, 484 const DicomMap& source,
485 const std::string& remoteIp, 485 const std::string& remoteIp,
486 const std::string& remoteAet, 486 const std::string& remoteAet,
487 const std::string& calledAet) 487 const std::string& calledAet)
488 { 488 {
489 static const char* LUA_CALLBACK = "IncomingFindRequestFilter";
490
489 LuaScripting::Locker locker(context_.GetLua()); 491 LuaScripting::Locker locker(context_.GetLua());
490 static const char* CALLBACK = "IncomingFindRequestFilter"; 492 if (!locker.GetLua().IsExistingFunction(LUA_CALLBACK))
491
492 if (!locker.GetLua().IsExistingFunction(CALLBACK))
493 { 493 {
494 return false; 494 return false;
495 } 495 }
496 else 496 else
497 { 497 {
498 Json::Value origin = Json::objectValue; 498 Json::Value origin = Json::objectValue;
499 origin["RemoteIp"] = remoteIp; 499 origin["RemoteIp"] = remoteIp;
500 origin["RemoteAet"] = remoteAet; 500 origin["RemoteAet"] = remoteAet;
501 origin["CalledAet"] = calledAet; 501 origin["CalledAet"] = calledAet;
502 502
503 LuaFunctionCall call(locker.GetLua(), CALLBACK); 503 LuaFunctionCall call(locker.GetLua(), LUA_CALLBACK);
504 call.PushDicom(source); 504 call.PushDicom(source);
505 call.PushJson(origin); 505 call.PushJson(origin);
506 FromDcmtkBridge::ExecuteToDicom(target, call); 506 FromDcmtkBridge::ExecuteToDicom(target, call);
507 507
508 return true; 508 return true;