[Reconnoiter-devel] [reconnoiter commit] Reconnoiter branch, master, updated. dc70cbf1a0618972c2a55e3c573805eb44e6dcde

git at labs.omniti.com git at labs.omniti.com
Thu Apr 26 14:56:52 EDT 2012


Pushed by: jesus
The branch, master has been updated
       via  dc70cbf1a0618972c2a55e3c573805eb44e6dcde (commit)
      from  09603d13f50b9162de5f1e183128d6c6663ee59c (commit)

Summary of changes:
 src/noit_check_rest.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

Log:
commit dc70cbf1a0618972c2a55e3c573805eb44e6dcde
Author: Theo Schlossnagle <jesus at omniti.com>
Date:   Thu Apr 26 14:53:13 2012 -0400

    correctly support namespaces in disjoint (shatter) documents.
    
    The shatter code glues multiple documents together and as such
    the namespace we need may not be in the super-parent even after
    we add it to our specific node.  So, after we miss out of the
    super-parent, we should check to see if we've added it to the
    node we're about to add it to.

diff --git a/src/noit_check_rest.c b/src/noit_check_rest.c
index a3fd6af..95aab4a 100644
--- a/src/noit_check_rest.c
+++ b/src/noit_check_rest.c
@@ -436,8 +436,14 @@ configure_xml_check(xmlNodePtr parent, xmlNodePtr check, xmlNodePtr a, xmlNodePt
       if(n->ns) {
         targetns = xmlSearchNs(parent->doc, xmlDocGetRootElement(parent->doc),
                                n->ns->prefix);
-noitL(noit_error,"Setting a config value in a namespace (%p)\n", targetns);
-        if(!targetns) targetns = xmlNewNs(config, n->ns->href, n->ns->prefix);
+        if(!targetns) {
+          targetns = xmlSearchNs(config->doc, config, n->ns->prefix);
+          if(!targetns) targetns = xmlNewNs(config, n->ns->href, n->ns->prefix);
+          noitL(noit_error,"Setting a config value in a new namespace (%p)\n", targetns);
+        }
+        else {
+          noitL(noit_error,"Setting a config value in a namespace (%p)\n", targetns);
+        }
       }
       xmlNodePtr co = xmlNewNode(targetns, n->name);
       if(n->ns && !strcmp((char *)n->name, "value")) {




hooks/post-receive
-- 
Reconnoiter


More information about the Reconnoiter-devel mailing list