# HG changeset patch # User Alain Mazy # Date 1702889532 -3600 # Node ID 68e9f7815fb8b137d738ce5f6e2eea4d1ca20062 # Parent 8f1a0ba5c7596f69d35e3c09ba520c37fc783865 Clarified recycle/reject + protection diff -r 8f1a0ba5c759 -r 68e9f7815fb8 OrthancServer/Resources/Configuration.json --- a/OrthancServer/Resources/Configuration.json Tue Dec 12 14:24:30 2023 +0100 +++ b/OrthancServer/Resources/Configuration.json Mon Dec 18 09:52:12 2023 +0100 @@ -51,7 +51,9 @@ // In "Reject" mode, the sender will receive a 0xA700 DIMSE status code // if the instance was sent through C-Store, a 507 HTTP status code // if using the REST API and a 0xA700 Failure reason when using - // DicomWeb Stow-RS + // DicomWeb Stow-RS. + // Note: this value is taken into account only if you have set + // a MaximumStorageSize != 0 or a MaximumPatientCount != 0 // Allowed values: "Recycle", "Reject" // (new in Orthanc 1.11.2) "MaximumStorageMode" : "Recycle", diff -r 8f1a0ba5c759 -r 68e9f7815fb8 OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Tue Dec 12 14:24:30 2023 +0100 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Mon Dec 18 09:52:12 2023 +0100 @@ -342,8 +342,10 @@ { call.GetDocumentation() .SetTag("Patients") - .SetSummary("Protect one patient against recycling") - .SetDescription("Check out configuration options `MaximumStorageSize` and `MaximumPatientCount`") + .SetSummary("Protect/Unprotect a patient against recycling") + .SetDescription("Protects a patient by sending `1` or `true` in the payload request. " + "Unprotects a patient by sending `0` or `false` in the payload requests. " + "More info: https://orthanc.uclouvain.be/book/faq/features.html#recycling-protection") .SetUriArgument("id", "Orthanc identifier of the patient of interest"); return; } diff -r 8f1a0ba5c759 -r 68e9f7815fb8 OrthancServer/Sources/ServerIndex.cpp --- a/OrthancServer/Sources/ServerIndex.cpp Tue Dec 12 14:24:30 2023 +0100 +++ b/OrthancServer/Sources/ServerIndex.cpp Mon Dec 18 09:52:12 2023 +0100 @@ -417,11 +417,17 @@ if (mode == MaxStorageMode_Recycle) { - LOG(WARNING) << "Maximum Storage mode: Recycle"; + if (maximumStorageSize_ > 0 || maximumPatients_ > 0) + { + LOG(WARNING) << "Maximum Storage mode: Recycle"; + } } else { - LOG(WARNING) << "Maximum Storage mode: Reject"; + if (maximumStorageSize_ > 0 || maximumPatients_ > 0) + { + LOG(WARNING) << "Maximum Storage mode: Reject"; + } } }