]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5422] Bug in kea-docgen fixed.
authorTomek Mrugalski <tomasz@isc.org>
Wed, 13 Jun 2018 08:54:21 +0000 (10:54 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Tue, 29 Oct 2019 17:57:13 +0000 (18:57 +0100)
doc/guide/hooks.xml
tools/cmd-docgen/kea_docgen.cc

index 34f0c28dc7db2193fb40c77e2b81d3bd76b575e1..68c959f0045ba930b8e871ff9b676a41c0b58e14 100644 (file)
@@ -1524,7 +1524,7 @@ Here is an example of complex IPv6 reservation:
         </para>
         </section>
 
-        <section xml:id="cmd-reservation-get">
+        <section xml:id="command-reservation-get">
           <title>reservation-get command</title>
           <para><command>reservation-get</command> can be used to query the host
           database and retrieve existing reservations. There are two types of
@@ -1602,7 +1602,7 @@ An example result returned when the query was malformed:<screen>
 
         </section>
 
-        <section xml:id="cmd-reservation-del">
+        <section xml:id="command-reservation-del">
           <title>reservation-del command</title>
           <para><command>reservation-del</command> can be used to delete a
           reservation from the host database. There are two types of parameters
index 027a145bd9805ed86de0e7dded054b6e774359a7..2b0758dc61bced37a97c3f11cebc7231f4b5a992 100644 (file)
@@ -235,7 +235,7 @@ void generateCommand(stringstream& f, const ElementPtr& cmd) {
       << endl << endl;
 
     // description and examples
-    f << "<para>Description and examples: See <xref linkend=\"cmd-"
+    f << "<para>Description and examples: See <xref linkend=\"command-"
       << cmd->get("name")->stringValue() << "\"/></para>" << endl << endl;
 
     // Command syntax:
@@ -243,7 +243,7 @@ void generateCommand(stringstream& f, const ElementPtr& cmd) {
       << "  <screen>" << escapeString(cmd->get("cmd-syntax")->stringValue())
       << "</screen>"
       << endl;
-    if (cmd->get("cmd-comment")) {
+    if (cmd->contains("cmd-comment")) {
         f << cmd->get("cmd-comment")->stringValue();
     }
     f << "</para>" << endl << endl;
@@ -251,7 +251,8 @@ void generateCommand(stringstream& f, const ElementPtr& cmd) {
     // Response syntax
     f << "<para>Response syntax:" << endl
       << "  <screen>";
-    if (cmd->get("resp->syntax")) {
+
+    if (cmd->contains("resp-syntax")) {
         f << escapeString(cmd->get("resp-syntax")->stringValue());
     } else {
         f << escapeString(standardResponseSyntax());