Mercurial > hg > orthanc
changeset 3048:8b331be57606
fix build without plugins
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 20 Dec 2018 16:18:20 +0100 |
parents | 095193bbd7b9 |
children | 6a2c7e206ebb 4e43e67f8ecf |
files | OrthancServer/OrthancRestApi/OrthancRestResources.cpp OrthancServer/main.cpp UnitTestsSources/FromDcmtkTests.cpp |
diffstat | 3 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestResources.cpp Thu Dec 20 15:24:55 2018 +0100 +++ b/OrthancServer/OrthancRestApi/OrthancRestResources.cpp Thu Dec 20 16:18:20 2018 +0100 @@ -39,6 +39,7 @@ #include "../../Core/DicomParsing/Internals/DicomImageDecoder.h" #include "../../Core/HttpServer/HttpContentNegociation.h" #include "../../Core/Logging.h" +#include "../DefaultDicomImageDecoder.h" #include "../OrthancConfiguration.h" #include "../Search/LookupResource.h" #include "../ServerContext.h"
--- a/OrthancServer/main.cpp Thu Dec 20 15:24:55 2018 +0100 +++ b/OrthancServer/main.cpp Thu Dec 20 16:18:20 2018 +0100 @@ -356,11 +356,13 @@ const IHttpHandler::Arguments& httpHeaders, const IHttpHandler::GetArguments& getArguments) { +#if ORTHANC_ENABLE_PLUGINS == 1 if (plugins_ != NULL && !plugins_->IsAllowed(method, uri, ip, username, httpHeaders, getArguments)) { return false; } +#endif static const char* HTTP_FILTER = "IncomingHttpRequestFilter"; @@ -1232,8 +1234,12 @@ #elif ORTHANC_ENABLE_PLUGINS == 0 // The plugins are disabled - databasePtr.reset(lock.GetConfiguration().CreateDatabaseWrapper()); - storage.reset(lock.GetConfiguration().CreateStorageArea()); + + databasePtr.reset(CreateDatabaseWrapper()); + storage.reset(CreateStorageArea()); + + assert(databasePtr.get() != NULL); + assert(storage.get() != NULL); return ConfigureDatabase(*databasePtr, *storage, NULL, upgradeDatabase, loadJobsFromDatabase);
--- a/UnitTestsSources/FromDcmtkTests.cpp Thu Dec 20 15:24:55 2018 +0100 +++ b/UnitTestsSources/FromDcmtkTests.cpp Thu Dec 20 16:18:20 2018 +0100 @@ -320,6 +320,7 @@ TEST(FromDcmtkBridge, ValueRepresentationConversions) { +#if ORTHANC_ENABLE_PLUGINS == 1 ASSERT_EQ(1, ValueRepresentation_ApplicationEntity); ASSERT_EQ(1, OrthancPluginValueRepresentation_AE); @@ -358,6 +359,7 @@ ValueRepresentation orthanc = Plugins::Convert(plugins); ASSERT_EQ(plugins, Plugins::Convert(orthanc)); } +#endif }