Roxen.git / server / modules / scripting / webapp.pike

version» Context lines:

Roxen.git/server/modules/scripting/webapp.pike:4:   inherit "roxen-module://filesystem";      #include <module.h>      import Parser.XML.Tree;      //<locale-token project="mod_webapp">LOCALE</locale-token>   #define LOCALE(X,Y) _DEF_LOCALE("mod_webapp",X,Y)   // end of the locale related stuff    - constant cvs_version = "$Id: webapp.pike,v 2.33 2009/05/07 14:15:55 mast Exp $"; + constant cvs_version = "$Id$";      constant thread_safe=1;   constant module_unique = 0;      protected inherit "http";      #define WEBAPP_CHAINING      #ifdef WEBAPP_DEBUG   # define WEBAPP_WERR(X) werror("WebApp: "+X+"\n")
Roxen.git/server/modules/scripting/webapp.pike:952:    }       int check(string ct)    {    WRAP_WERR("CHAIN check called");    return map_servlet_chain(ct)?1:0;    }   }       - #if constant(thread_create) +    // Servlet loading mutex   Thread.Mutex load_mutex = Thread.Mutex(); - #endif +          int load_servlet(mapping(string:string|mapping|Servlet.servlet|int) servlet)   { - #if constant(thread_create) +     // Serialize initializations so concurrent threads won't init the same    // servlet several times.    Thread.MutexKey key = load_mutex->lock(); - #endif +        string classname = servlet["servlet-class"];       if (!servlet->loaded)    {    if (classname) {    WEBAPP_WERR(sprintf("Trying to load %s from %s",    servlet["servlet-name"], classname));    mixed exc = catch(servlet->servlet = Servlet.servlet(classname, cls_loader));    if(exc)