NIC router: read Strings also with attribute_value

Ref #2193
This commit is contained in:
Martin Stein 2016-12-22 01:02:50 +01:00 committed by Norman Feske
parent 83040d7d86
commit 045a30865a
3 changed files with 3 additions and 8 deletions

View File

@ -110,8 +110,7 @@ Session_component *Net::Root::_create_session(char const *args)
try {
Session_label const label = label_from_args(args);
Session_policy policy(label, _config.node());
Domain_name domain_name(Cstring(policy.attribute("domain").value_base(),
policy.attribute("domain").value_size()));
Domain_name domain_name(policy.attribute_value("domain", Domain_name()));
Domain &domain = _config.domains().find_by_name(domain_name);

View File

@ -40,10 +40,7 @@ Domain_avl_member::Domain_avl_member(Domain_name const &name,
*****************/
Domain_base::Domain_base(Xml_node const node)
:
_name(Cstring(node.attribute("name").value_base(),
node.attribute("name").value_size()))
{ }
: _name(node.attribute_value("name", Domain_name())) { }
/************

View File

@ -24,8 +24,7 @@ Domain &Leaf_rule::_find_domain(Domain_tree &domains,
{
try {
return domains.find_by_name(
Cstring(node.attribute("domain").value_base(),
node.attribute("domain").value_size()));
node.attribute_value("domain", Domain_name()));
}
catch (Domain_tree::No_match) { throw Invalid(); }
}