]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2746] Clear duplicated vector at global initialization
authorJelte Jansen <jelte@isc.org>
Mon, 4 Mar 2013 10:02:31 +0000 (11:02 +0100)
committerJelte Jansen <jelte@isc.org>
Mon, 4 Mar 2013 10:02:31 +0000 (11:02 +0100)
src/lib/log/logger_manager.cc
src/lib/log/tests/message_dictionary_unittest.cc

index 77893d079b08d9b4e3ce08d90f98566df5558603..8d0978a2ba82c1367118eae18ea595cb26d926ec 100644 (file)
@@ -133,7 +133,7 @@ LoggerManager::init(const std::string& root, isc::log::Severity severity,
              i != duplicates.end(); ++i) {
             LOG_WARN(logger, LOG_DUPLICATE_MESSAGE_ID).arg(*i);
         }
-
+        MessageInitializer::clearDuplicates();
     }
 
     // Replace any messages with local ones (if given)
index b8bded364c797a9bec98973ecef6814015e6e4c9..848ccb3213cb64637e58156bf15a264fa24c5e8d 100644 (file)
@@ -189,9 +189,9 @@ TEST_F(MessageDictionaryTest, GlobalTest) {
 // new symbol.
 
 TEST_F(MessageDictionaryTest, GlobalLoadTest) {
+    // There were duplicates but the vector should be cleared in init() now
     vector<string>& duplicates = MessageInitializer::getDuplicates();
-    ASSERT_EQ(1, duplicates.size());
-    EXPECT_EQ(string("LOG_DUPLICATE_NAMESPACE"), duplicates[0]);
+    ASSERT_EQ(0, duplicates.size());
 
     string text = MessageDictionary::globalDictionary().getText("NEWSYM");
     EXPECT_EQ(string("new symbol added"), text);