Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // A vitual server's main configuration   // Copyright © 1996 - 2000, Roxen IS. - constant cvs_version = "$Id: configuration.pike,v 1.393 2000/11/13 04:16:36 nilsson Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.394 2000/11/13 09:57:04 per Exp $";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.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:2047:    invalidate_cache();    return 1;   }      RoxenModule reload_module( string modname )   {    RoxenModule old_module = find_module( modname );    ModuleInfo mi = roxen.find_module( (modname/"#")[0] );    if( !old_module ) return 0;    -  save_one( old_module ); +  master()->clear_compilation_failures();    -  +  if( !old_module->fake ) +  { +  save_one( old_module );    master()->refresh_inherit( object_program( old_module ) );    master()->refresh( object_program( old_module ), 1 ); -  +  }       catch( disable_module( modname, 1 ) );       RoxenModule nm;       if( catch( nm = enable_module( modname, 0, 0, 1 ) ) || (nm == 0) )    enable_module( modname, (nm=old_module), mi, 1 );    else    {    foreach ((array) old_module->error_log, [string msg, array(int) times])    nm->error_log[msg] += times;    -  +  ModuleInfo mi = roxen.find_module( (modname/"#")[0] );    catch( mi->update_with( nm,0 ) ); // This is sort of nessesary...       nm->report_notice(LOC_C(11, "Reloaded %s.")+"\n", mi->get_name());    // It's possible e.g. in the admin interface that the module    // being reloaded is in use for the current request, so delay it a    // little.    //call_out (destruct, 2, old_module);    // Nope, can't do that since there are things like lookup caches    // that count on that the old module object is gone before the new    // is started.