Changeset 293

Show
Ignore:
Timestamp:
06/13/10 12:44:01 (20 months ago)
Author:
ol
Message:

Libxml2 single init and cleanup. related to fastcgi architecture changes

Location:
trunk/src
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/fe/fe_filter.c

    r262 r293  
    441441    } 
    442442 
    443     xmlInitParser(); 
    444     LIBXML_TEST_VERSION  
    445  
    446443    xmldoc = xmlParseMemory(xmlchar->buf, xmlchar->use); 
    447444 
     
    449446        fe->error_code = FE_ERROR_FILTER; 
    450447        xmlFreeDoc(xmldoc); 
    451         xmlCleanupParser(); 
    452448        return fe; 
    453449    } 
     
    479475 
    480476    xmlFreeDoc(xmldoc); 
    481     xmlCleanupParser(); 
    482477 
    483478    return fe; 
  • trunk/src/ows/ows.c

    r289 r293  
    337337        buffer_add_str(o->config_file, OWS_CONFIG_FILE_PATH); 
    338338 
     339    LIBXML_TEST_VERSION 
     340 
    339341    /* Parse the configuration file and initialize ows struct */ 
    340342    if (!o->exit) ows_parse_config(o, o->config_file->buf); 
     
    353355    if (!o->exit) ows_layers_storage_fill(o); 
    354356    if (!o->exit) ows_log(o, 2, "== Filling Storage =="); 
    355  
    356357 
    357358 
     
    446447    OS_LibShutdown(); 
    447448#endif 
     449    xmlCleanupParser(); 
    448450    ows_log(o, 2, "== TINYOWS SHUTDOWN =="); 
    449451    if (o->log) fclose (o->log); 
  • trunk/src/ows/ows_config.c

    r278 r293  
    755755    assert(filename != NULL); 
    756756 
    757     xmlInitParser(); 
    758757    r = xmlReaderForFile(filename, "UTF-8", 0); 
    759758 
    760759    if (r == NULL) { 
    761         xmlCleanupParser(); 
    762760        ows_error(o, OWS_ERROR_CONFIG_FILE, "Unable to open config file !", 
    763761                  "parse_config_file"); 
     
    800798    if (ret != 0) { 
    801799        xmlFreeTextReader(r); 
    802         xmlCleanupParser(); 
    803800        ows_error(o, OWS_ERROR_CONFIG_FILE, "Unable to open config file !", 
    804801                  "parse_config_file"); 
     
    807804 
    808805    xmlFreeTextReader(r); 
    809     xmlCleanupParser(); 
    810806 
    811807    ows_config_check(o); 
  • trunk/src/ows/ows_request.c

    r285 r293  
    131131/* 
    132132 * Valid an xml string against an XML schema 
    133  * Inpired from: http://xml.developpez.com/sources/?page=validation#validate_XSD_CppCLI_2 
    134133 */ 
    135134int ows_schema_validation(const ows *o, buffer * xml_schema, buffer * xml, bool schema_is_file) 
     
    163162    if (schema == NULL) { 
    164163        xmlSchemaCleanupTypes(); 
    165         xmlMemoryDump(); 
    166         xmlCleanupParser(); 
    167164        return ret; 
    168165    } 
     
    183180    xmlSchemaFree(schema); 
    184181    xmlFreeDoc(doc); 
    185     xmlCleanupParser(); 
    186182 
    187183    return ret; 
  • trunk/src/struct/cgi_request.c

    r287 r293  
    464464    n = NULL; 
    465465 
    466     xmlInitParser(); 
    467466    xmldoc = xmlParseMemory(query, strlen(query)); 
    468467 
    469468    if (!xmldoc || (n = xmlDocGetRootElement(xmldoc)) == NULL) { 
    470469        xmlFreeDoc(xmldoc); 
    471         xmlCleanupParser(); 
    472470        ows_error(o, OWS_ERROR_INVALID_PARAMETER_VALUE, "xml isn't valid", 
    473471                  "request"); 
     
    608606 
    609607    xmlFreeDoc(xmldoc); 
    610     xmlCleanupParser(); 
    611608 
    612609    return arr; 
  • trunk/src/wfs/wfs_transaction.c

    r286 r293  
    914914    content = NULL; 
    915915 
    916     xmlInitParser(); 
    917916    xmldoc = xmlParseMemory(op->buf, op->use); 
    918917 
    919918    if (!xmldoc) { 
    920919        xmlFreeDoc(xmldoc); 
    921         xmlCleanupParser(); 
    922920        wfs_error(o, wr, WFS_ERROR_NO_MATCHING, "xml isn't valid", "transaction"); 
    923921        return; 
     
    996994 
    997995    xmlFreeDoc(xmldoc); 
    998     xmlCleanupParser(); 
    999996} 
    1000997