diff options
author | Jelte Jansen <jelte@isc.org> | 2011-06-06 11:19:35 +0200 |
---|---|---|
committer | Jelte Jansen <jelte@isc.org> | 2011-06-06 11:19:35 +0200 |
commit | 5638c66218f33efb7fbf7e3700d49ff7b6b0f090 (patch) | |
tree | 76b4f07f1954992d4a78b59088db02877ce5a755 /src/lib/config/config_data.cc | |
parent | [trac736] fix after merge (diff) | |
download | kea-5638c66218f33efb7fbf7e3700d49ff7b6b0f090.tar.xz kea-5638c66218f33efb7fbf7e3700d49ff7b6b0f090.zip |
[trac736] a few cleanups
Diffstat (limited to 'src/lib/config/config_data.cc')
-rw-r--r-- | src/lib/config/config_data.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/config/config_data.cc b/src/lib/config/config_data.cc index 1abfac89dd..17722d850c 100644 --- a/src/lib/config/config_data.cc +++ b/src/lib/config/config_data.cc @@ -49,11 +49,13 @@ find_spec_part(ConstElementPtr spec, const std::string& identifier) { while(sep != std::string::npos) { std::string part = id.substr(0, sep); + // As long as we are not in the 'final' element as specified + // by the identifier, we want to automatically traverse list + // and map specifications while (spec_part->getType() == Element::map && (spec_part->contains("list_item_spec") || spec_part->contains("map_item_spec"))) { if (spec_part->contains("list_item_spec")) { - std::cout << "[XX] traversing list item " << id << std::endl; spec_part = spec_part->get("list_item_spec"); } else { spec_part = spec_part->get("map_item_spec"); @@ -108,11 +110,12 @@ find_spec_part(ConstElementPtr spec, const std::string& identifier) { isc_throw(DataNotFoundError, id + " in " + identifier + " not found"); } } else { - isc_throw(DataNotFoundError, "Element above " + id + " in " + identifier + " is not a map"); + isc_throw(DataNotFoundError, "Element above " + id + + " in " + identifier + + " is not a map"); } } } - std::cout << "[XX] RETURNING SPEC PART FOR '" << identifier << "': " << spec_part->str() << std::endl; return (spec_part); } |