From: Francis Dupont Date: Fri, 23 Apr 2021 12:44:56 +0000 (+0200) Subject: [#1652] Addressed last comments X-Git-Tag: Kea-1.9.7~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbb5bd5f2429401d9a28f6aed46100d9b3ef736c;p=thirdparty%2Fkea.git [#1652] Addressed last comments --- diff --git a/ChangeLog b/ChangeLog index 9f73cc07bf..3db8689ae3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1889. [func] fdupont + Added support of comments (shell '#', C++ '//' and C + '/*...*/') in JSON commands sent via the control channel or + the Control Agent. + (Gitlab #1652) + 1888. [func] tmark Added a new operational mode, HA+MT, to the HA hook library. HA+MT provides direct, multi-threaded HTTP communication diff --git a/doc/sphinx/arm/ctrl-channel.rst b/doc/sphinx/arm/ctrl-channel.rst index 646e006875..fbad15b3fb 100644 --- a/doc/sphinx/arm/ctrl-channel.rst +++ b/doc/sphinx/arm/ctrl-channel.rst @@ -179,7 +179,24 @@ that depends on the specific command. .. note:: Since Kea 1.9.7 it is possible to put comments in the commands as - in the configuration file. + in the configuration file, for instance: + +:: + + POST / HTTP/1.1\r\n + Content-Type: application/json\r\n + Content-Length: 147\r\n\r\n + { + "command": "foo", + // service is a list + "service": [ "dhcp4" ] + # command arguments are here. + "arguments": { + "param1": "value1"/*, + "param2": "value2", + ...*/ + } + } .. _ctrl-channel-client: diff --git a/src/lib/cc/tests/json_feed_unittests.cc b/src/lib/cc/tests/json_feed_unittests.cc index d30ca7ca4a..84739f7f43 100644 --- a/src/lib/cc/tests/json_feed_unittests.cc +++ b/src/lib/cc/tests/json_feed_unittests.cc @@ -153,7 +153,8 @@ public: }; -// This test verifies that toElement should not be called too soon. +// This test verifies that toElement should not be called before +// the feed detects the end of the data stream. TEST_F(JSONFeedTest, toElementTooSoon) { JSONFeed feed; ASSERT_NO_THROW(feed.initModel());