changeset 1674:4fc502d469f4 db-changes

fix build if SSL is disabled
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 02 Oct 2015 13:31:39 +0200
parents 0bbcfd9695e5
children 131136aeeaa7
files Core/Enumerations.h Core/HttpServer/MongooseServer.cpp Plugins/Include/orthanc/OrthancCPlugin.h Resources/ErrorCodes.json
diffstat 4 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Core/Enumerations.h	Fri Oct 02 13:26:05 2015 +0200
+++ b/Core/Enumerations.h	Fri Oct 02 13:31:39 2015 +0200
@@ -134,6 +134,7 @@
     ErrorCode_StorageAreaAlreadyRegistered = 2036    /*!< Another plugin has already registered a custom storage area */,
     ErrorCode_DatabaseBackendAlreadyRegistered = 2037    /*!< Another plugin has already registered a custom database back-end */,
     ErrorCode_DatabaseNotInitialized = 2038    /*!< Plugin trying to call the database during its initialization */,
+    ErrorCode_SslDisabled = 2039    /*!< Orthanc has been built without SSL support */,
     ErrorCode_START_PLUGINS = 1000000
   };
 
--- a/Core/HttpServer/MongooseServer.cpp	Fri Oct 02 13:26:05 2015 +0200
+++ b/Core/HttpServer/MongooseServer.cpp	Fri Oct 02 13:31:39 2015 +0200
@@ -931,7 +931,7 @@
 #if ORTHANC_SSL_ENABLED == 0
     if (enabled)
     {
-      throw OrthancException("Orthanc has been built without SSL support");
+      throw OrthancException(ErrorCode_SslDisabled);
     }
     else
     {
--- a/Plugins/Include/orthanc/OrthancCPlugin.h	Fri Oct 02 13:26:05 2015 +0200
+++ b/Plugins/Include/orthanc/OrthancCPlugin.h	Fri Oct 02 13:31:39 2015 +0200
@@ -267,6 +267,7 @@
     OrthancPluginErrorCode_StorageAreaAlreadyRegistered = 2036    /*!< Another plugin has already registered a custom storage area */,
     OrthancPluginErrorCode_DatabaseBackendAlreadyRegistered = 2037    /*!< Another plugin has already registered a custom database back-end */,
     OrthancPluginErrorCode_DatabaseNotInitialized = 2038    /*!< Plugin trying to call the database during its initialization */,
+    OrthancPluginErrorCode_SslDisabled = 2039    /*!< Orthanc has been built without SSL support */,
 
     _OrthancPluginErrorCode_INTERNAL = 0x7fffffff
   } OrthancPluginErrorCode;
--- a/Resources/ErrorCodes.json	Fri Oct 02 13:26:05 2015 +0200
+++ b/Resources/ErrorCodes.json	Fri Oct 02 13:31:39 2015 +0200
@@ -492,5 +492,10 @@
     "Code": 2038,
     "Name": "DatabaseNotInitialized",
     "Description": "Plugin trying to call the database during its initialization"
+  },
+  { 
+    "Code": 2039,
+    "Name": "SslDisabled",
+    "Description": "Orthanc has been built without SSL support"
   }
 ]