# HG changeset patch # User Sebastien Jodogne # Date 1615300667 -3600 # Node ID 42a846166fa342d81043c15c7961b037066febfc # Parent fb0379abb4a72a2451112ad58eb688ec20239401 removing link to ServerIndex in ReadWriteTransaction diff -r fb0379abb4a7 -r 42a846166fa3 OrthancServer/Sources/ServerIndex.cpp --- a/OrthancServer/Sources/ServerIndex.cpp Tue Mar 09 15:25:17 2021 +0100 +++ b/OrthancServer/Sources/ServerIndex.cpp Tue Mar 09 15:37:47 2021 +0100 @@ -1091,7 +1091,7 @@ Transaction transaction(*this, TransactionType_ReadWrite); { assert(listener_.get() != NULL); - ReadWriteTransaction t(db_, *listener_, *this); + ReadWriteTransaction t(db_, *listener_); writeOperations->Apply(t); } transaction.Commit(); @@ -3081,17 +3081,6 @@ } - static void SetInstanceMetadata(ResourcesContent& content, - std::map& instanceMetadata, - int64_t instance, - MetadataType metadata, - const std::string& value) - { - content.AddMetadata(instance, metadata, value); - instanceMetadata[metadata] = value; - } - - StoreStatus ServerIndex::Store(std::map& instanceMetadata, const DicomMap& dicomSummary, const Attachments& attachments, @@ -3128,6 +3117,18 @@ std::string hashStudy_; std::string hashSeries_; std::string hashInstance_; + + + static void SetInstanceMetadata(ResourcesContent& content, + std::map& instanceMetadata, + int64_t instance, + MetadataType metadata, + const std::string& value) + { + content.AddMetadata(instance, metadata, value); + instanceMetadata[metadata] = value; + } + static bool ComputeExpectedNumberOfInstances(int64_t& target, const DicomMap& dicomSummary) diff -r fb0379abb4a7 -r 42a846166fa3 OrthancServer/Sources/ServerIndex.h --- a/OrthancServer/Sources/ServerIndex.h Tue Mar 09 15:25:17 2021 +0100 +++ b/OrthancServer/Sources/ServerIndex.h Tue Mar 09 15:37:47 2021 +0100 @@ -309,15 +309,12 @@ { private: Listener& listener_; - ServerIndex& index_; // TODO - REMOVE public: ReadWriteTransaction(IDatabaseWrapper& db, - Listener& listener, - ServerIndex& index) : + Listener& listener) : ReadOnlyTransaction(db), - listener_(listener), - index_(index) + listener_(listener) { }