Mercurial > hg > orthanc
changeset 5467:68e9f7815fb8
Clarified recycle/reject + protection
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 18 Dec 2023 09:52:12 +0100 |
parents | 8f1a0ba5c759 |
children | 47334eeaaa1a |
files | OrthancServer/Resources/Configuration.json OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp OrthancServer/Sources/ServerIndex.cpp |
diffstat | 3 files changed, 15 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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",
--- 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; }
--- 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"; + } } }