changeset 4229:013d6c6b2387

warning
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 06 Oct 2020 13:13:17 +0200
parents c8c0bbaaace3
children b313a0001893
files OrthancFramework/Sources/HttpServer/HttpServer.cpp
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/HttpServer/HttpServer.cpp	Tue Oct 06 12:45:11 2020 +0200
+++ b/OrthancFramework/Sources/HttpServer/HttpServer.cpp	Tue Oct 06 13:13:17 2020 +0200
@@ -1836,12 +1836,22 @@
                             IWebDavBucket* bucket)
   {
     std::unique_ptr<IWebDavBucket> protection(bucket);
-    
+
     if (bucket == NULL)
     {
       throw OrthancException(ErrorCode_NullPointer);
     }
 
+    Stop();
+    
+#if CIVETWEB_HAS_WEBDAV_WRITING == 0
+    if (webDavBuckets_.size() == 0)
+    {
+      LOG(WARNING) << "Your version of the Orthanc framework was compiled "
+                   << "without support for writing into WebDAV collections";
+    }
+#endif
+    
     const std::string s = Toolbox::FlattenUri(root);
 
     if (webDavBuckets_.find(s) != webDavBuckets_.end())