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 - 2001, Roxen IS.   //      // @appears Configuration   //! A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.485 2001/09/06 15:02:59 grubba Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.486 2001/09/10 16:13:31 mast 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:2451:       foreach (old_error_log, [string msg, array(int) times])    nm->error_log[msg] += times;       nm->report_notice(LOC_C(11, "Reloaded %s.")+"\n", mi->get_name());    return nm;   }      #ifdef THREADS   Thread.Mutex enable_modules_mutex = Thread.Mutex(); - #define MODULE_LOCK \ -  Thread.MutexKey enable_modules_lock = enable_modules_mutex->lock (2) + #define MODULE_LOCK(TYPE) \ +  Thread.MutexKey enable_modules_lock = enable_modules_mutex->lock (TYPE)   #else - #define MODULE_LOCK + #define MODULE_LOCK(TYPE)   #endif      static int enable_module_batch_msgs;      RoxenModule enable_module( string modname, RoxenModule|void me,    ModuleInfo|void moduleinfo,    int|void nostart )   { -  MODULE_LOCK; +  MODULE_LOCK (2);    int id;    ModuleCopies module;    int pr;    mixed err;    int module_type;       if( forcibly_added[modname] == 2 )    return search(otomod, modname);       if( datacache ) datacache->flush();
Roxen.git/server/base_server/configuration.pike:2960:    pri[pr]->first_modules -= ({ me });    }       if( moduleinfo->type & MODULE_LOGGER )    for(pr=0; pr<10; pr++)    pri[pr]->logger_modules -= ({ me });   }      int disable_module( string modname, int|void nodest )   { -  MODULE_LOCK; +  MODULE_LOCK (2);    RoxenModule me;    int id, pr;    sscanf(modname, "%s#%d", modname, id );       if( datacache ) datacache->flush();       ModuleInfo moduleinfo = roxen.find_module( modname );    mapping module = modules[ modname ];    string descr = moduleinfo->get_name() + (id ? " copy " + (id + 1) : "");   
Roxen.git/server/base_server/configuration.pike:3109:   array after_init_hooks = ({});   mixed add_init_hook( mixed what )   {    if( inited )    call_out( what, 0, this_object() );    else    after_init_hooks |= ({ what });   }      static int got_no_delayed_load = 0; - // 0 -> enabled delayed loading, 1 -> disable delayed loading, + // 0 -> enable delayed loading, 1 -> disable delayed loading,   // -1 -> don't change.      void fix_no_delayed_load_flag()   {    if( got_no_delayed_load >= 0 &&    query ("no_delayed_load") != got_no_delayed_load ) {    set( "no_delayed_load", got_no_delayed_load );    save_one( 0 );    }   }      void enable_all_modules()   { -  MODULE_LOCK; +  MODULE_LOCK (0);    low_init( );    fix_no_delayed_load_flag();   }      void low_init(void|int modules_already_enabled)   {    if( inited )    return; // already done       int start_time = gethrtime();