changeset 3049:6a2c7e206ebb db-changes

integration mainline->db-changes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 20 Dec 2018 16:18:38 +0100
parents 1c095185074c (current diff) 8b331be57606 (diff)
children d8a91acb7424
files OrthancServer/OrthancRestApi/OrthancRestResources.cpp OrthancServer/main.cpp
diffstat 3 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Thu Dec 20 16:06:38 2018 +0100
+++ b/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Thu Dec 20 16:18:38 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 "../ServerContext.h"
 #include "../ServerToolbox.h"
--- a/OrthancServer/main.cpp	Thu Dec 20 16:06:38 2018 +0100
+++ b/OrthancServer/main.cpp	Thu Dec 20 16:18:38 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 16:06:38 2018 +0100
+++ b/UnitTestsSources/FromDcmtkTests.cpp	Thu Dec 20 16:18:38 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
 }