Mercurial > hg > orthanc
diff OrthancServer/main.cpp @ 1806:cd213ebcaefd
UnknownSopClassAccepted option
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 23 Nov 2015 15:24:39 +0100 |
parents | 138664eb59de |
children | 91216c42c6e5 |
line wrap: on
line diff
--- a/OrthancServer/main.cpp Fri Nov 20 16:50:01 2015 +0100 +++ b/OrthancServer/main.cpp Mon Nov 23 15:24:39 2015 +0100 @@ -190,7 +190,7 @@ virtual bool IsAllowedTransferSyntax(const std::string& remoteIp, const std::string& remoteAet, - const std::string& /*calledAet*/, + const std::string& calledAet, TransferSyntax syntax) { std::string configuration; @@ -239,6 +239,32 @@ LuaFunctionCall call(locker.GetLua(), lua.c_str()); call.PushString(remoteAet); call.PushString(remoteIp); + call.PushString(calledAet); + return call.ExecutePredicate(); + } + } + + return Configuration::GetGlobalBoolParameter(configuration, true); + } + + + virtual bool IsUnknownSopClassAccepted(const std::string& remoteIp, + const std::string& remoteAet, + const std::string& calledAet) + { + static const char* configuration = "UnknownSopClassAccepted"; + + { + std::string lua = "Is" + std::string(configuration); + + LuaScripting::Locker locker(context_.GetLua()); + + if (locker.GetLua().IsExistingFunction(lua.c_str())) + { + LuaFunctionCall call(locker.GetLua(), lua.c_str()); + call.PushString(remoteAet); + call.PushString(remoteIp); + call.PushString(calledAet); return call.ExecutePredicate(); } }