# HG changeset patch # User Sebastien Jodogne # Date 1477924938 -3600 # Node ID 2fabd10737287774fe2bdeaad2dc37c8a0e4050a # Parent a657f7772e6915017c4088023283fc9fc0268139 prevent registering two tags with the same symbolic name diff -r a657f7772e69 -r 2fabd1073728 OrthancServer/FromDcmtkBridge.cpp --- a/OrthancServer/FromDcmtkBridge.cpp Mon Oct 31 15:23:32 2016 +0100 +++ b/OrthancServer/FromDcmtkBridge.cpp Mon Oct 31 15:42:18 2016 +0100 @@ -317,6 +317,13 @@ { DictionaryLocker locker; + + if (locker->findEntry(name.c_str())) + { + LOG(ERROR) << "Cannot register two tags with the same symbolic name \"" << name << "\""; + throw OrthancException(ErrorCode_AlreadyExistingTag); + } + locker->addEntry(entry.release()); } } diff -r a657f7772e69 -r 2fabd1073728 Resources/Configuration.json --- a/Resources/Configuration.json Mon Oct 31 15:23:32 2016 +0100 +++ b/Resources/Configuration.json Mon Oct 31 15:42:18 2016 +0100 @@ -326,6 +326,6 @@ // possibly the Private Creator (for private tags). "Dictionary" : { // "0014,1020" : [ "DA", "ValidationExpiryDate", 1, 1 ] - // "00e1,10c2" : [ "UI", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ] + // "00e1,10c2" : [ "SH", "PET-CT Multi Modality Name", 1, 1, "ELSCINT1" ] } }