Changeset b2a08ebd72aed85e425a8b853ac201b7faac0453

Show
Ignore:
Timestamp:
03/29/12 21:26:14 (2 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1333056374 +0000
git-parent:

[a90855c69b0558acdbe4524e80b60e40a40c6b21]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1333056374 +0000
Message:

create namespaces in the return document without regard for the master config

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_check_rest.c

    ra90855c rb2a08eb  
    216216  mod_cnt = noit_check_registered_module_cnt(); 
    217217  for(mod=0; mod<mod_cnt; mod++) { 
    218     noit_conf_section_t toplevel; 
    219     xmlNodePtr nodeptr; 
    220218    xmlNsPtr ns; 
    221219    const char *nsname; 
     
    224222    nsname = noit_check_registered_module(mod); 
    225223  
    226     toplevel = noit_conf_get_section(NULL, "/*"); 
    227     nodeptr = (xmlNodePtr)toplevel;  
    228224    snprintf(buff, sizeof(buff), "noit://module/%s", nsname); 
    229     ns = xmlSearchNs(nodeptr->doc, nodeptr, (xmlChar *)nsname); 
     225    ns = xmlSearchNs(root->doc, root, (xmlChar *)nsname); 
     226    if(!ns) ns = xmlNewNs(root, (xmlChar *)buff, (xmlChar *)nsname); 
    230227    if(ns) { 
    231228      configh = noit_conf_get_namespaced_hash(node, "config", nsname);