]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5017] The new parser is now being used.
authorTomek Mrugalski <tomasz@isc.org>
Wed, 14 Dec 2016 23:17:56 +0000 (00:17 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Wed, 14 Dec 2016 23:17:56 +0000 (00:17 +0100)
src/bin/dhcp4/kea_controller.cc

index 102691cc3b3b2452a0adfa97b415447a43d6c8ac..60a289bb027d2b0899bf3273d505850a7d82dba2 100644 (file)
@@ -9,6 +9,7 @@
 #include <dhcp4/json_config_parser.h>
 #include <dhcp4/ctrl_dhcp4_srv.h>
 #include <dhcp4/dhcp4_log.h>
+#include <dhcp4/parser_context.h>
 #include <dhcpsrv/cfgmgr.h>
 #include <exceptions/exceptions.h>
 
@@ -52,7 +53,8 @@ void configure(const std::string& file_name) {
         }
 
         // Read contents of the file and parse it as JSON
-        json = isc::data::Element::fromJSONFile(file_name, true);
+        Parser4Context parser;
+        json = parser.parseFile(file_name, Parser4Context::PARSER_DHCP4);
         if (!json) {
             isc_throw(isc::BadValue, "no configuration found");
         }