changeset 5255:f783b99e4738 db-protobuf

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Apr 2023 16:28:28 +0200
parents fafdb6179829
children 261ce0ed85e6
files OrthancFramework/Sources/SerializationToolbox.cpp OrthancFramework/Sources/SerializationToolbox.h OrthancServer/Resources/Configuration.json
diffstat 3 files changed, 21 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/SerializationToolbox.cpp	Tue Apr 11 11:09:52 2023 +0200
+++ b/OrthancFramework/Sources/SerializationToolbox.cpp	Tue Apr 11 16:28:28 2023 +0200
@@ -72,6 +72,21 @@
   }
 
 
+  std::string SerializationToolbox::ReadString(const Json::Value& value,
+                                               const std::string& field,
+                                               const std::string& defaultValue)
+  {
+    if (value.isMember(field.c_str()))
+    {
+      return ReadString(value, field);
+    }
+    else
+    {
+      return defaultValue;
+    }
+  }
+
+
   int SerializationToolbox::ReadInteger(const Json::Value& value,
                                         const std::string& field)
   {
--- a/OrthancFramework/Sources/SerializationToolbox.h	Tue Apr 11 11:09:52 2023 +0200
+++ b/OrthancFramework/Sources/SerializationToolbox.h	Tue Apr 11 16:28:28 2023 +0200
@@ -38,6 +38,10 @@
     static std::string ReadString(const Json::Value& value,
                                   const std::string& field);
 
+    static std::string ReadString(const Json::Value& value,
+                                  const std::string& field,
+                                  const std::string& defaultValue);
+
     static int ReadInteger(const Json::Value& value,
                            const std::string& field);
 
--- a/OrthancServer/Resources/Configuration.json	Tue Apr 11 11:09:52 2023 +0200
+++ b/OrthancServer/Resources/Configuration.json	Tue Apr 11 16:28:28 2023 +0200
@@ -433,8 +433,8 @@
     //  "AllowStore" : true,
     //  "AllowStorageCommitment" : false,  // new in 1.6.0
     //  "AllowTranscoding" : true,         // new in 1.7.0
-    //  "UseDicomTls" : false              // new in 1.9.0
-    //  "LocalAet" : "HELLO"               // new in 1.9.0
+    //  "UseDicomTls" : false,             // new in 1.9.0
+    //  "LocalAet" : "HELLO",              // new in 1.9.0
     //  "Timeout" : 60                     // new in 1.9.1
     //}
   },