BIND 10 trac2445, updated. 38db6aff7d759e5f271cf0d369459b361c8e60a7 [2445] Make sure buffer is flushed in dhcp[46] stand-alone

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Dec 4 17:35:45 UTC 2012


The branch, trac2445 has been updated
       via  38db6aff7d759e5f271cf0d369459b361c8e60a7 (commit)
      from  daca34509f65af73d06ce071340668258539f6c6 (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 38db6aff7d759e5f271cf0d369459b361c8e60a7
Author: Jelte Jansen <jelte at isc.org>
Date:   Tue Dec 4 09:34:59 2012 -0800

    [2445] Make sure buffer is flushed in dhcp[46] stand-alone
    
    even when -s was not given but it reverts to standalone because of a session error

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

Summary of changes:
 src/bin/dhcp4/main.cc |    5 +++++
 src/bin/dhcp6/main.cc |    5 +++++
 2 files changed, 10 insertions(+)

-----------------------------------------------------------------------
diff --git a/src/bin/dhcp4/main.cc b/src/bin/dhcp4/main.cc
index 4bf55ea..45f1de1 100644
--- a/src/bin/dhcp4/main.cc
+++ b/src/bin/dhcp4/main.cc
@@ -17,6 +17,7 @@
 #include <dhcp4/ctrl_dhcp4_srv.h>
 #include <dhcp4/dhcp4_log.h>
 #include <log/logger_support.h>
+#include <log/logger_manager.h>
 
 #include <boost/lexical_cast.hpp>
 
@@ -113,6 +114,10 @@ main(int argc, char* argv[]) {
                 LOG_ERROR(dhcp4_logger, DHCP4_SESSION_FAIL).arg(ex.what());
                 // Let's continue. It is useful to have the ability to run
                 // DHCP server in stand-alone mode, e.g. for testing
+                // We do need to make sure logging is no longer buffered
+                // since then it would not print until dhcp6 is stopped
+                isc::log::LoggerManager log_manager;
+                log_manager.process();
             }
         } else {
             LOG_DEBUG(dhcp4_logger, DBG_DHCP4_START, DHCP4_STANDALONE);
diff --git a/src/bin/dhcp6/main.cc b/src/bin/dhcp6/main.cc
index 501a00a..ced7422 100644
--- a/src/bin/dhcp6/main.cc
+++ b/src/bin/dhcp6/main.cc
@@ -17,6 +17,7 @@
 #include <dhcp6/ctrl_dhcp6_srv.h>
 #include <dhcp6/dhcp6_log.h>
 #include <log/logger_support.h>
+#include <log/logger_manager.h>
 
 #include <boost/lexical_cast.hpp>
 
@@ -122,6 +123,10 @@ main(int argc, char* argv[]) {
                 LOG_ERROR(dhcp6_logger, DHCP6_SESSION_FAIL).arg(ex.what());
                 // Let's continue. It is useful to have the ability to run
                 // DHCP server in stand-alone mode, e.g. for testing
+                // We do need to make sure logging is no longer buffered
+                // since then it would not print until dhcp6 is stopped
+                isc::log::LoggerManager log_manager;
+                log_manager.process();
             }
         } else {
             LOG_DEBUG(dhcp6_logger, DBG_DHCP6_START, DHCP6_STANDALONE);



More information about the bind10-changes mailing list