Browse Source

[5151] Minor corrections after review:

 - remove missed debug printout
 - using pretty print to write the file
 - correctly grammar in the guide
Tomek Mrugalski 8 years ago
parent
commit
ffb2681173

+ 1 - 1
doc/guide/ctrl-channel.xml

@@ -150,7 +150,7 @@ will be sent to Kea and the responses received from Kea printed to standard outp
         name used when starting Kea (passed as -c argument) will be used. Note
         that the filename specified must not contain .. or backslashes. Kea
         should be able to write its files only in the directory it is running
-        and any attempts to step out of that directory is rejected.</para>
+        and any attempts to step out of that directory will be rejected.</para>
         <para>
           An example command invocation looks like this:
 <screen>

+ 0 - 2
src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc

@@ -237,8 +237,6 @@ public:
     void checkConfigWrite(const std::string& response_txt, int exp_status,
                           const std::string& exp_txt = "") {
 
-        // cout << "#### response=" << response_txt << endl;
-
         ConstElementPtr rsp;
         EXPECT_NO_THROW(rsp = Element::fromJSON(response_txt));
         ASSERT_TRUE(rsp);

+ 2 - 1
src/lib/dhcpsrv/daemon.cc

@@ -218,7 +218,8 @@ Daemon::writeConfigFile(const std::string& config_file) const {
         isc_throw(Unexpected, "Unable to open file " + config_file + " for writing");
     }
 
-    out << cfg->str();
+    // Write the actual content using pretty printing.
+    isc::data::prettyPrint(cfg, out);
 
     size_t bytes = static_cast<size_t>(out.tellp());