diff OrthancServer/ServerContext.cpp @ 1632:eb8fbcf008b5

fix build with plugins disabled
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 21 Sep 2015 14:05:06 +0200
parents bd1889029cbb
children de1413733c97 f5ddbd9239dd
line wrap: on
line diff
--- a/OrthancServer/ServerContext.cpp	Mon Sep 21 13:33:50 2015 +0200
+++ b/OrthancServer/ServerContext.cpp	Mon Sep 21 14:05:06 2015 +0200
@@ -108,7 +108,9 @@
     dicomCache_(provider_, DICOM_CACHE_SIZE),
     scheduler_(Configuration::GetGlobalIntegerParameter("LimitJobs", 10)),
     lua_(*this),
+#if ORTHANC_PLUGINS_ENABLED == 1
     plugins_(NULL),
+#endif
     done_(false),
     queryRetrieveArchive_(Configuration::GetGlobalIntegerParameter("QueryRetrieveSize", 10)),
     defaultLocalAet_(Configuration::GetGlobalStringParameter("DicomAet", "ORTHANC"))
@@ -435,6 +437,7 @@
   }
 
 
+#if ORTHANC_PLUGINS_ENABLED == 1
   void ServerContext::SetPlugins(OrthancPlugins& plugins)
   {
     boost::recursive_mutex::scoped_lock lock(listenersMutex_);
@@ -460,12 +463,6 @@
   }
 
 
-  bool ServerContext::HasPlugins() const
-  {
-    return (plugins_ != NULL);
-  }
-
-
   const OrthancPlugins& ServerContext::GetPlugins() const
   {
     if (HasPlugins())
@@ -477,4 +474,16 @@
       throw OrthancException(ErrorCode_InternalError);
     }
   }
+
+#endif
+
+
+  bool ServerContext::HasPlugins() const
+  {
+#if ORTHANC_PLUGINS_ENABLED == 1
+    return (plugins_ != NULL);
+#else
+    return false;
+#endif
+  }
 }