Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
bdfcf8c8
Commit
bdfcf8c8
authored
Dec 15, 2016
by
Tomek Mrugalski
🛰
Browse files
[5017] The new parser is now being used.
parent
e38b37ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp4/kea_controller.cc
View file @
bdfcf8c8
...
...
@@ -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"
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment