[svn] commit: r27 - /experiments/jelte-configuration/config_obj.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Sun Sep 20 19:49:27 UTC 2009
Author: jelte
Date: Sun Sep 20 19:49:26 2009
New Revision: 27
Log:
minor comment, one update (the check for getvalue())
Modified:
experiments/jelte-configuration/config_obj.cc
Modified: experiments/jelte-configuration/config_obj.cc
==============================================================================
--- experiments/jelte-configuration/config_obj.cc (original)
+++ experiments/jelte-configuration/config_obj.cc Sun Sep 20 19:49:26 2009
@@ -367,12 +367,12 @@
if (!n) {
throw ConfigError("null element");
}
+ /* check whether this node has a gettable value */
if (n->getNodeType() == n->ATTRIBUTE_NODE ||
(n->getNodeType() == n->ELEMENT_NODE &&
- !n->hasChildNodes() ||
- (n->getFirstChild() == n->getLastChild() &&
- n->getFirstChild()->getNodeType() == n->TEXT_NODE
- )
+ n->hasChildNodes() &&
+ n->getFirstChild() == n->getLastChild() &&
+ n->getFirstChild()->getNodeType() == n->TEXT_NODE
)
) {
return XMLStringToString(n->getTextContent());
@@ -390,8 +390,8 @@
if (!n) {
throw ConfigError("null element");
}
- /* fail if this is not an attribute or an
- * element with only one text child */
+ /* fail if this is not an attribute or an empty
+ * element, or one with only one text child */
if (n->getNodeType() == n->ATTRIBUTE_NODE ||
(n->getNodeType() == n->ELEMENT_NODE &&
!n->hasChildNodes() ||
More information about the bind10-changes
mailing list