BIND 10 master, updated. 4a82ece4c4e353ab8e3ceb01fd8e0f4824ac6bbf [master] update changelog for #1093 and #1741

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Mar 7 17:50:34 UTC 2012


The branch, master has been updated
       via  4a82ece4c4e353ab8e3ceb01fd8e0f4824ac6bbf (commit)
       via  b8960ab85c717fe70ad282e0052ac0858c5b57f7 (commit)
       via  f537c7e12fb7b25801408f93132ed33410edae76 (commit)
       via  81d738596851cc2f0d4e475c9c26e7e41c8bc1f7 (commit)
       via  736fb87e53b0d57241c4e414ed5de2f3eacc6e6e (commit)
       via  5a8474bf5e3b8e10959c76b573d3f0e1af03ebf1 (commit)
       via  ac03fb060596dbebbb012d091292e4c9690f1c88 (commit)
      from  d7fb4b7244e60a034e21873d5bd32f7148ccd973 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4a82ece4c4e353ab8e3ceb01fd8e0f4824ac6bbf
Author: Jelte Jansen <jelte at isc.org>
Date:   Wed Mar 7 18:50:20 2012 +0100

    [master] update changelog for #1093 and #1741

commit b8960ab85c717fe70ad282e0052ac0858c5b57f7
Merge: f537c7e12fb7b25801408f93132ed33410edae76 81d738596851cc2f0d4e475c9c26e7e41c8bc1f7
Author: Jelte Jansen <jelte at isc.org>
Date:   Wed Mar 7 18:39:11 2012 +0100

    [master] Merge branch 'trac1741'

commit f537c7e12fb7b25801408f93132ed33410edae76
Merge: d7fb4b7244e60a034e21873d5bd32f7148ccd973 5a8474bf5e3b8e10959c76b573d3f0e1af03ebf1
Author: Jelte Jansen <jelte at isc.org>
Date:   Wed Mar 7 18:39:01 2012 +0100

    [master] Merge branch 'trac1093'

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                              |    8 ++++++++
 src/bin/resolver/main.cc               |    3 ++-
 src/bin/resolver/resolver_messages.mes |    2 +-
 src/lib/log/compiler/message.cc        |   18 ++++++++++--------
 4 files changed, 21 insertions(+), 10 deletions(-)

-----------------------------------------------------------------------
diff --git a/ChangeLog b/ChangeLog
index 2c2a37b..50cf705 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+395.	[bug]		jelte
+	The log message compiler now errors (resulting in build failures) if
+	duplicate log message identifiers are found in a single message file.
+	Renamed one duplicate that was found (RESOLVER_SHUTDOWN, renamed to
+	RESOLVER_SHUTDOWN_RECEIVED).
+	(Trac #1093, git f537c7e12fb7b25801408f93132ed33410edae76)
+	(Trac #1741, git b8960ab85c717fe70ad282e0052ac0858c5b57f7)
+
 394.	[bug]		jelte
 	b10-auth now catches any exceptions during response building; if any
 	datasource either throws an exception or causes an exception to be
diff --git a/src/bin/resolver/main.cc b/src/bin/resolver/main.cc
index c56e6f3..d14fb0b 100644
--- a/src/bin/resolver/main.cc
+++ b/src/bin/resolver/main.cc
@@ -100,7 +100,8 @@ my_command_handler(const string& command, ConstElementPtr args) {
                     return (answer);
                 }
             }
-            LOG_DEBUG(resolver_logger, RESOLVER_DBG_INIT, RESOLVER_SHUTDOWN);
+            LOG_DEBUG(resolver_logger, RESOLVER_DBG_INIT,
+                      RESOLVER_SHUTDOWN_RECEIVED);
             io_service.stop();
         }
 
diff --git a/src/bin/resolver/resolver_messages.mes b/src/bin/resolver/resolver_messages.mes
index bd9c818..4999dbe 100644
--- a/src/bin/resolver/resolver_messages.mes
+++ b/src/bin/resolver/resolver_messages.mes
@@ -247,6 +247,6 @@ The log message shows the query in the form of <query name>/<query
 type>/<query class>, and the client that sends the query in the form of
 <Source IP address>#<source port>.
 
-% RESOLVER_SHUTDOWN asked to shut down, doing so
+% RESOLVER_SHUTDOWN_RECEIVED received command to shut down
 A debug message noting that the server was asked to terminate and is
 complying to the request.
diff --git a/src/lib/log/compiler/message.cc b/src/lib/log/compiler/message.cc
index 3c8a3f2..fb0f038 100644
--- a/src/lib/log/compiler/message.cc
+++ b/src/lib/log/compiler/message.cc
@@ -491,22 +491,22 @@ writeProgramFile(const string& file, const vector<string>& ns_components,
 }
 
 
-/// \brief Warn of Duplicate Entries
+/// \brief Error and exit if there are duplicate entries
 ///
-/// If the input file contained duplicate message IDs, only the first will be
-/// processed.  However, we should warn about it.
+/// If the input file contained duplicate message IDs, we print an
+/// error for each of them, then exit the program with a non-0 value.
 ///
 /// \param reader Message Reader used to read the file
 
 void
-warnDuplicates(MessageReader& reader) {
+errorDuplicates(MessageReader& reader) {
 
     // Get the duplicates (the overflow) and, if present, sort them into some
     // order and remove those which occur more than once (which mean that they
     // occur more than twice in the input file).
     MessageReader::MessageIDCollection duplicates = reader.getNotAdded();
-    if (duplicates.size() > 0) {
-        cout << "Warning: the following duplicate IDs were found:\n";
+    if (!duplicates.empty()) {
+        cout << "Error: the following duplicate IDs were found:\n";
 
         sort(duplicates.begin(), duplicates.end());
         MessageReader::MessageIDCollection::iterator new_end =
@@ -515,6 +515,7 @@ warnDuplicates(MessageReader& reader) {
             i != new_end; ++i) {
             cout << "    " << *i << "\n";
         }
+        exit(1);
     }
 }
 
@@ -580,6 +581,9 @@ main(int argc, char* argv[]) {
         MessageReader reader(&dictionary);
         reader.readFile(message_file);
 
+        // Error (and quit) if there are of any duplicates encountered.
+        errorDuplicates(reader);
+
         if (doPython) {
             // Warn in case of ignored directives
             if (!reader.getNamespace().empty()) {
@@ -604,8 +608,6 @@ main(int argc, char* argv[]) {
                              output_directory);
         }
 
-        // Finally, warn of any duplicates encountered.
-        warnDuplicates(reader);
     }
     catch (const MessageException& e) {
         // Create an error message from the ID and the text



More information about the bind10-changes mailing list