Mercurial > hg > orthanc
comparison OrthancServer/ServerIndex.cpp @ 1300:919dfb2fb3fe
DANGEROUS refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 06 Feb 2015 15:30:46 +0100 |
parents | 4ce47e8ed0d2 |
children | 7b6925b0890d |
comparison
equal
deleted
inserted
replaced
1299:4ce47e8ed0d2 | 1300:919dfb2fb3fe |
---|---|
445 ChangeType changeType, | 445 ChangeType changeType, |
446 ResourceType resourceType, | 446 ResourceType resourceType, |
447 const std::string& publicId) | 447 const std::string& publicId) |
448 { | 448 { |
449 ServerIndexChange change(changeType, resourceType, publicId); | 449 ServerIndexChange change(changeType, resourceType, publicId); |
450 db_.LogChange(internalId, change); | 450 |
451 if (changeType <= ChangeType_INTERNAL_LastLogged) | |
452 { | |
453 db_.LogChange(internalId, change); | |
454 } | |
455 | |
456 assert(listener_.get() != NULL); | |
457 listener_->SignalChange(change); | |
451 } | 458 } |
452 | 459 |
453 | 460 |
454 uint64_t ServerIndex::IncrementGlobalSequenceInternal(GlobalProperty property) | 461 uint64_t ServerIndex::IncrementGlobalSequenceInternal(GlobalProperty property) |
455 { | 462 { |
520 throw OrthancException(ErrorCode_InternalError); | 527 throw OrthancException(ErrorCode_InternalError); |
521 } | 528 } |
522 | 529 |
523 ServerIndexChange change(changeType, type, publicId); | 530 ServerIndexChange change(changeType, type, publicId); |
524 db_.LogChange(id, change); | 531 db_.LogChange(id, change); |
532 | |
533 assert(listener_.get() != NULL); | |
534 listener_->SignalChange(change); | |
535 | |
525 return id; | 536 return id; |
526 } | 537 } |
527 | 538 |
528 | 539 |
529 ServerIndex::ServerIndex(ServerContext& context, | 540 ServerIndex::ServerIndex(ServerContext& context, |