Roxen.git / server / base_server / rxml.pike

version» Context lines:

Roxen.git/server/base_server/rxml.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2009, Roxen IS.   //   // The Roxen RXML Parser. See also the RXML Pike modules.   // - // $Id: rxml.pike,v 1.334 2012/05/10 16:12:07 grubba Exp $ + // $Id$         inherit "rxmlhelp";   #include <config.h>   #include <request_trace.h>         // ------------------------- RXML Parser ------------------------------      protected class RXMLTagSet   // This tag set always has the highest priority.   {    inherit RXML.TagSet;       string prefix = RXML_NAMESPACE;    - #if constant (thread_create) +     Thread.Mutex lists_mutex = Thread.Mutex();    // Locks destructive changes to the arrays modules and imported. - #endif +        array(RoxenModule) modules;    // Each element in the imported array is the registered tag set of a    // parser module. This array contains the corresponding module    // object.       int censor_request;    // Remove sensitive auth data from the request before parsing. The    // data is lost and will not be available again afterwards.       void sort_on_priority()    { - #if constant (thread_create) +     Thread.MutexKey lock = lists_mutex->lock(); - #endif +     int i = search (imported, Roxen.entities_tag_set);   #ifdef DEBUG    if (i < 0) error ("Module list does not contain "    "Roxen.entities_tag_set: %O\n", imported);    {    int j = search (imported, Roxen.entities_tag_set, i + 1);    if (j != -1)    error ("Module list matches Roxen.entities_tag_set "    "more than once (at %d and %d): %O\n", i, j, imported);    }
Roxen.git/server/base_server/rxml.pike:108:    }    else    SIMPLE_TRACE_ENTER (owner, "Preparing for top level RXML parse - "    "replacing id->misc->defines");       // These settings ought to be in id->misc but are in this    // mapping for historical reasons.    misc->language = defines->language;    misc->present_languages = defines->present_languages;    +  if (defines->theme_language) +  misc->theme_language = defines->theme_language; +     id->misc->defines = misc;    }    else    SIMPLE_TRACE_ENTER (owner, "Preparing for %s RXML parse - "    "id->misc->defines is already the same as "    "RXML_CONTEXT->misc",    defines->rxml_misc ? "nested" : "top level");    }    else {    SIMPLE_TRACE_ENTER (owner, "Preparing for top level RXML parse - "
Roxen.git/server/base_server/rxml.pike:494:    lambda (string name) {    return GenericPITag (name, @defs[name]);    }));       if (search (rxml_tag_set->imported, tag_set) < 0) {   #ifdef THREADS    Thread.MutexKey lock = rxml_tag_set->lists_mutex->lock();   #endif    rxml_tag_set->modules += ({mod});    rxml_tag_set->imported += ({tag_set}); +  rxml_tag_set->changed();   #ifdef THREADS    lock = 0;   #endif    remove_call_out (rxml_tag_set->sort_on_priority);    call_out (rxml_tag_set->sort_on_priority, 0);    }   }      void remove_parse_module (RoxenModule mod)   {