# HG changeset patch # User Sebastien Jodogne # Date 1615219690 -3600 # Node ID c12d4e5f469b8527899a18910cd8bde7b2997959 # Parent 9224e107d613844dd3811c89cb15c673f911b474 removed redundant ServerIndex::SignalNewResource() diff -r 9224e107d613 -r c12d4e5f469b OrthancServer/Sources/ServerIndex.cpp --- a/OrthancServer/Sources/ServerIndex.cpp Mon Mar 08 16:49:34 2021 +0100 +++ b/OrthancServer/Sources/ServerIndex.cpp Mon Mar 08 17:08:10 2021 +0100 @@ -683,19 +683,6 @@ } - void ServerIndex::SignalNewResource(ChangeType changeType, - ResourceType level, - const std::string& publicId, - int64_t internalId) - { - ServerIndexChange change(changeType, level, publicId); - db_.LogChange(internalId, change); - - assert(listener_.get() != NULL); - listener_->SignalChange(change); - } - - StoreStatus ServerIndex::Store(std::map& instanceMetadata, const DicomMap& dicomSummary, const Attachments& attachments, @@ -764,21 +751,21 @@ // impact when new patient/study/series get created, which // occurs far less often that creating new instances. The // positive impact looks marginal in practice. - SignalNewResource(ChangeType_NewInstance, ResourceType_Instance, hashInstance, instanceId); + LogChange(instanceId, ChangeType_NewInstance, ResourceType_Instance, hashInstance); if (status.isNewSeries_) { - SignalNewResource(ChangeType_NewSeries, ResourceType_Series, hashSeries, status.seriesId_); + LogChange(status.seriesId_, ChangeType_NewSeries, ResourceType_Series, hashSeries); } if (status.isNewStudy_) { - SignalNewResource(ChangeType_NewStudy, ResourceType_Study, hashStudy, status.studyId_); + LogChange(status.studyId_, ChangeType_NewStudy, ResourceType_Study, hashStudy); } if (status.isNewPatient_) { - SignalNewResource(ChangeType_NewPatient, ResourceType_Patient, hashPatient, status.patientId_); + LogChange(status.patientId_, ChangeType_NewPatient, ResourceType_Patient, hashPatient); } diff -r 9224e107d613 -r c12d4e5f469b OrthancServer/Sources/ServerIndex.h --- a/OrthancServer/Sources/ServerIndex.h Mon Mar 08 16:49:34 2021 +0100 +++ b/OrthancServer/Sources/ServerIndex.h Mon Mar 08 17:08:10 2021 +0100 @@ -101,11 +101,6 @@ ResourceType resourceType, const std::string& publicId); - void SignalNewResource(ChangeType changeType, - ResourceType level, - const std::string& publicId, - int64_t internalId); - void NormalizeLookup(std::vector& target, const DatabaseLookup& source, ResourceType level) const;