Show
Ignore:
Timestamp:
05/15/09 02:42:40 (5 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1242355360 +0000
git-parent:

[f5e593b3a2875895dd7e3f4489b4435f7712c831]

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

fixes #123

Files:

Legend:

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

    r88a7178 rea6ba41  
    4040#include "noit_module.h" 
    4141#include "noit_check.h" 
     42#include "noit_xml.h" 
    4243 
    4344#include <unistd.h> 
     
    9394    xmlDocPtr xmldoc; 
    9495    xmlNodePtr root, cmds; 
    95     xmlBufferPtr xmlbuffer; 
    96     xmlSaveCtxtPtr savectx; 
    9796 
    9897    cl = ac->service_ctx = calloc(1, sizeof(*cl)); 
     
    150149 
    151150    /* Write it out to a buffer and copy it for writing */ 
    152     xmlbuffer = xmlBufferCreate(); 
    153     savectx = xmlSaveToBuffer(xmlbuffer, "utf8", 1); 
    154     xmlSaveDoc(savectx, xmldoc); 
    155     xmlSaveClose(savectx); 
    156     cl->buff = strdup((const char *)xmlBufferContent(xmlbuffer)); 
    157     cl->towrite = xmlBufferLength(xmlbuffer); 
     151    cl->buff = noit_xmlSaveToBuffer(xmldoc); 
     152    cl->towrite = strlen(cl->buff); 
    158153 
    159154    /* Clean up after ourselves */ 
    160     xmlBufferFree(xmlbuffer); 
    161155    xmlFreeDoc(xmldoc); 
    162156  }