From: Tomek Mrugalski Date: Wed, 13 Jun 2018 08:54:21 +0000 (+0200) Subject: [5422] Bug in kea-docgen fixed. X-Git-Tag: 176-update-to-sysrepo-0-7-6-release_base~178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0021f33d05742a071c0f6d05877f4748dfd3f19;p=thirdparty%2Fkea.git [5422] Bug in kea-docgen fixed. --- diff --git a/doc/guide/hooks.xml b/doc/guide/hooks.xml index 34f0c28dc7..68c959f004 100644 --- a/doc/guide/hooks.xml +++ b/doc/guide/hooks.xml @@ -1524,7 +1524,7 @@ Here is an example of complex IPv6 reservation: -
+
reservation-get command reservation-get 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:
-
+
reservation-del command reservation-del can be used to delete a reservation from the host database. There are two types of parameters diff --git a/tools/cmd-docgen/kea_docgen.cc b/tools/cmd-docgen/kea_docgen.cc index 027a145bd9..2b0758dc61 100644 --- a/tools/cmd-docgen/kea_docgen.cc +++ b/tools/cmd-docgen/kea_docgen.cc @@ -235,7 +235,7 @@ void generateCommand(stringstream& f, const ElementPtr& cmd) { << endl << endl; // description and examples - f << "Description and examples: See Description and examples: See get("name")->stringValue() << "\"/>" << endl << endl; // Command syntax: @@ -243,7 +243,7 @@ void generateCommand(stringstream& f, const ElementPtr& cmd) { << " " << escapeString(cmd->get("cmd-syntax")->stringValue()) << "" << endl; - if (cmd->get("cmd-comment")) { + if (cmd->contains("cmd-comment")) { f << cmd->get("cmd-comment")->stringValue(); } f << "" << endl << endl; @@ -251,7 +251,8 @@ void generateCommand(stringstream& f, const ElementPtr& cmd) { // Response syntax f << "Response syntax:" << endl << " "; - if (cmd->get("resp->syntax")) { + + if (cmd->contains("resp-syntax")) { f << escapeString(cmd->get("resp-syntax")->stringValue()); } else { f << escapeString(standardResponseSyntax());