Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // This file is part of Internet Server.   // Copyright © 1996 - 2001, Roxen IS.   //      // @appears Configuration   //! A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.530 2002/07/03 14:51:52 per Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.531 2002/07/03 20:20:32 nilsson 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)      #ifdef THROTTLING_DEBUG   #undef THROTTLING_DEBUG
Roxen.git/server/base_server/configuration.pike:490:   array (RoxenModule) get_providers(string provides)   //! Returns an array with all provider modules that provides "provides".   {    // This cache is cleared in the invalidate_cache() call.    if(!provider_module_cache[provides])    {    int i;    provider_module_cache[provides] = ({ });    for(i = 9; i >= 0; i--)    { -  foreach(indices(pri[i]->provider_modules), RoxenModule d) -  if(pri[i]->provider_modules[ d ][ provides ]) +  foreach(pri[i]->provider_modules; RoxenModule d; multiset(string) p) +  if( p[ provides ] )    provider_module_cache[provides] += ({ d });    }    }    return provider_module_cache[provides];   }      RoxenModule get_provider(string provides)   //! Returns the first provider module that provides "provides".   {    array (RoxenModule) prov = get_providers(provides);
Roxen.git/server/base_server/configuration.pike:783:      // Parse the logging format strings.   private inline string fix_logging(string s)   {    sscanf(s, "%*[\t ]%s", s);    return s;   }      private void parse_log_formats()   { -  string b; -  array foo=query("LogFormat")/"\n"; -  foreach(foo, b) +  foreach(String.SplitIterator(query("LogFormat"), '\n'); int x; string b)    if(strlen(b) && b[0] != '#' && sizeof(b/":")>1)    log_format[(int)(b/":")[0]] = fix_logging((b/":")[1..]*":");   }      void log(mapping file, RequestID request_id)   {    // Call all logging functions    foreach(logger_module_cache||logger_modules(), function f)    if( f( request_id, file ) )    return;
Roxen.git/server/base_server/configuration.pike:2449:   {    if(all)    {    store("spider#0", variables, 0, this_object());    start(2);    }       store( "EnabledModules", enabled_modules, 1, this_object());    foreach(modules; string modname; ModuleCopies mc)    { -  foreach(indices(mc->copies), int i) +  foreach(mc->copies; int i; mixed mod)    { -  store(modname+"#"+i, mc->copies[i]->query(), 0, this_object()); -  if (mixed err = catch(mc->copies[i]-> -  start(2, this_object()))) +  store(modname+"#"+i, mod->query(), 0, this_object()); +  if (mixed err = catch(mod->start(2, this_object())))    report_error("Error calling start in module.\n%s",    describe_backtrace (err));    }    }    invalidate_cache();   }      int save_one( RoxenModule o )   //! Save all variables in a given module.   {