Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2004, Roxen IS.   //      // @appears Configuration   //! A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.646 2008/02/28 19:38:05 jonasw Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.647 2008/03/17 13:28:53 grubba Exp $";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.h>   #include <timers.h>      #define CATCH(P,X) do{mixed e;if(e=catch{X;})report_error("While "+P+"\n"+describe_backtrace(e));}while(0)      // --- Locale defines ---   //<locale-token project="roxen_start"> LOC_S </locale-token>
Roxen.git/server/base_server/configuration.pike:320:    if (!has_prefix(q[r], key_prefix)) break;    really_low_expire_entry(q[r]);    q[r] = 0;    }    }    }       void set(string url, string data, mapping meta, int expire, RequestID id)    {    if( strlen( data ) > max_file_size ) { +  // NOTE: There's a possibility of a stale entry remaining in the +  // cache until it expires, rather than being replaced here.    SIMPLE_TRACE_ENTER (this, "Result of size %d is too large "    "to store in the protocol cache (limit %d)",    sizeof (data), max_file_size);    SIMPLE_TRACE_LEAVE ("");    return;    }       SIMPLE_TRACE_ENTER (this, "Storing result of size %d in the protocol cache "    "using key %O (expire in %ds)",    sizeof (data), url, expire);
Roxen.git/server/base_server/configuration.pike:585:   // A list of priority objects   array (Priority) pri = allocate_pris();      mapping modules = ([]);   //! All enabled modules in this site.   //! The format is "module":{ "copies":([ num:instance, ... ]) }      mapping (RoxenModule:string) otomod = ([]);   //! A mapping from the module objects to module names    + mapping(string:int) counters = ([]);      // Caches to speed up the handling of the module search.   // They are all sorted in priority order, and created by the functions   // below.   private array (function) url_module_cache, last_module_cache;   private array (function) logger_module_cache, first_module_cache;   private array (function) filter_module_cache;   private array (array (string|function)) location_module_cache;   private mapping (string:array (function)) file_extension_module_cache=([]);   private mapping (string:array (RoxenModule)) provider_module_cache=([]);
Roxen.git/server/base_server/configuration.pike:3697:    }   #endif    } else {    me->defvar("_priority", 0, "", TYPE_INT, "", 0, 1);    }       mapping(string:mixed) stored_vars = retrieve(modname + "#" + id, this_object());    int has_stored_vars = sizeof (stored_vars); // A little ugly, but it suffices.    me->setvars(stored_vars);    +  if (!module[id]) +  counters[moduleinfo->counter]++; +     module[ id ] = me;    otomod[ me ] = modname+"#"+id;       if(!nostart) call_start_callbacks( me, moduleinfo, module );      #ifdef MODULE_DEBUG    if (enable_module_batch_msgs) {    if(moduleinfo->config_locked[this_object()])    report_debug("\bLocked %6.1fms\n", (gethrtime()-start_time)/1000.0);    else
Roxen.git/server/base_server/configuration.pike:4073:    string bt=describe_backtrace(err);    report_error("disable_module(): " +    LOC_M(44, "Error while disabling module %s%s"),    descr, (bt ? ":\n"+bt : "\n"));    }      #ifdef MODULE_DEBUG    report_debug("Disabling "+descr+"\n");   #endif    +  if (moduleinfo->counter) { +  counters[moduleinfo->counter]--; +  } +     clean_up_for_module( moduleinfo, me );       if( !nodest )    {    m_delete( enabled_modules, modname + "#" + id );    m_delete( forcibly_added, modname + "#" + id );    store( "EnabledModules",enabled_modules, 1, this_object());    destruct(me);    }    return 1;