# HG changeset patch # User Sebastien Jodogne # Date 1779367525 -7200 # Node ID b891f8f14b51ed739832cab3ab9ad406329d2889 # Parent 7c9ecd5a793c54329f4aa0370e3d6681ff98678d simplification diff -r 7c9ecd5a793c -r b891f8f14b51 OrthancServer/Sources/ServerContext.cpp --- a/OrthancServer/Sources/ServerContext.cpp Thu May 21 14:13:21 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.cpp Thu May 21 14:45:25 2026 +0200 @@ -1148,9 +1148,7 @@ const FileInfo& attachment, const std::string& filename) { - std::unique_ptr range( - StorageAreaDataSource::ReadAttachment( - *storageAreaReader_, attachment, true /* uncompress */, checkMD5_)); + std::unique_ptr range(ReadAttachment(attachment, true /* uncompress */)); BufferHttpSender sender; sender.SetBuffer(range->GetData(), range->GetSize()); @@ -1191,10 +1189,7 @@ FileInfo modified; { - std::unique_ptr range( - StorageAreaDataSource::ReadAttachment( - *storageAreaReader_, attachment, true /* uncompress */, checkMD5_)); - + std::unique_ptr range(ReadAttachment(attachment, true /* uncompress */)); accessor.Write(modified, range->GetData(), range->GetSize(), attachmentType, compression, storeMD5_, NULL); } @@ -1394,9 +1389,7 @@ * "/.../.../reconstruct" will disable this case. **/ - std::unique_ptr dicomAsJson( - StorageAreaDataSource::ReadAttachment( - *storageAreaReader_, attachment, true /* uncompress */, checkMD5_)); + std::unique_ptr dicomAsJson(ReadAttachment(attachment, true /* uncompress */)); if (!Toolbox::ReadJson(result, dicomAsJson->GetData(), dicomAsJson->GetSize())) { @@ -1417,8 +1410,7 @@ throw OrthancException(ErrorCode_UnknownResource); } - std::unique_ptr range( - StorageAreaDataSource::ReadAttachment(*storageAreaReader_, attachment, true /* uncompress */, checkMD5_)); + std::unique_ptr range(ReadAttachment(attachment, true /* uncompress */)); // We don't use the cache, as this would complexify the code for a rare edge case ParsedDicomFile dicom(range->GetData(), range->GetSize()); diff -r 7c9ecd5a793c -r b891f8f14b51 OrthancServer/Sources/ServerContext.h --- a/OrthancServer/Sources/ServerContext.h Thu May 21 14:13:21 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.h Thu May 21 14:45:25 2026 +0200 @@ -587,7 +587,7 @@ void PublishCacheMetrics(); - const boost::shared_ptr& GetTranscoder() const; // TODO-Streaming : REMOVE + const boost::shared_ptr& GetTranscoder() const; Future* SubmitTranscodingRequest(TranscodingCallable* callable); };