2000-02-16
2000-02-16 16:04:59 by Per Hedbor <ph@opera.com>
-
c45e3f8e1cad14c71d9f2f7cc893ed551ad92e1c
(21 lines)
(+15/-6)
[
Show
| Annotate
]
Branch: 5.2
New feature: Having a constant no_delayed_load in a module makes the configuration in which the module is enables load it's module immediately, not on demand. Also fixed a bug with ready_to_receive_requests
Rev: server/base_server/configuration.pike:1.263
3:
* (C) 1996 - 2000 Idonex AB.
*/
- constant cvs_version = "$Id: configuration.pike,v 1.262 2000/02/16 15:36:56 per Exp $";
+ constant cvs_version = "$Id: configuration.pike,v 1.263 2000/02/16 16:04:59 per Exp $";
constant is_configuration = 1;
#include <module.h>
#include <roxen.h>
2085:
}
}
- // Save this configuration. If all is included, save all configuration
- // global variables as well, otherwise only all module variables.
+
void save_me()
{
save_one( 0 );
}
-
+ // Save this configuration. If all is included, save all configuration
+ // global variables as well, otherwise only all module variables.
void save(int|void all)
{
if(all)
2230:
if(module[id] && module[id] != me)
{
+ if( module[id]->stop )
module[id]->stop();
// if( err = catch( disable_module( modname+"#"+id ) ) )
// report_error(LOCALE->error_disabling_module(moduleinfo->get_name(),
2604: Inside #if defined(MODULE_DEBUG)
if (enable_module_batch_msgs)
report_debug("\bOK %6.1fms\n", (gethrtime()-start_time)/1000.0);
#endif
+ if( me->no_delayed_load )
+ set( "no_delayed_load", 1 );
return me;
}
2846:
void enable_all_modules()
{
- ready_to_receive_requests( );
+ int q = query( "no_delayed_load" );
+ set( "no_delayed_load", 0 );
+ low_init( );
+ if( q != query( "no_delayed_load" ) )
+ save_one( 0 );
}
- void ready_to_receive_requests()
+ void low_init()
{
if( inited )
return; // already done
3258:
resursen, och '$Me' med serverns URL");
+ definvisvar( "no_delayed_load", 0, TYPE_FLAG );
setvars(retrieve("spider#0", this_object()));