Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2004, Roxen IS.   //   // The Roxen WebServer main program.   //   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.1028 2009/04/03 17:47:19 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.1029 2009/04/21 18:11:39 mast Exp $";      //! @appears roxen   //!   //! The Roxen WebServer main program.      // The argument cache. Used by the image cache.   ArgCache argcache;      // Some headerfiles   #define IN_ROXEN
Roxen.git/server/base_server/roxen.pike:4897:   Configuration get_configuration (string name)   //! Gets the configuration with the given identifier name.   {   #ifdef DEBUG    if (sizeof (configurations) != sizeof (config_lookup))    error ("config_lookup out of synch with configurations.\n");   #endif    return config_lookup[name];   }    + private Configuration admin_config; +  + Configuration get_admin_configuration() + //! Returns the admin UI configuration, which is the one containing a + //! config_filesystem module instance. + { +  return admin_config; + } +    Configuration enable_configuration(string name)   {   #ifdef DEBUG    if (get_configuration (name))    error ("A configuration called %O already exists.\n", name);   #endif    bootstrap_info->set (name);    Configuration cf = _configuration();    configurations += ({ cf });    fix_config_lookup();
Roxen.git/server/base_server/roxen.pike:4934:   // Enable all configurations   void enable_configurations()   {    array err;    configurations = ({});    config_lookup = ([]);       foreach(list_all_configurations(), string config)    {    int t = gethrtime(); +  Configuration conf_obj; +  int is_admin_config;    report_debug("\nEnabling the configuration %s ...\n", config); -  if(err=catch( enable_configuration(config)->start(0) )) +  if(err=catch { +  conf_obj = enable_configuration(config); +  is_admin_config = conf_obj->start(0); +  })    report_error("\n"+LOC_M(35, "Error while loading configuration %s%s"),    config+":\n", describe_backtrace(err)+"\n"); -  +  if (is_admin_config) admin_config = conf_obj;    report_debug("Enabled %s in %.1fms\n", config, (gethrtime()-t)/1000.0 );    }    foreach( configurations, Configuration c )    {    if(sizeof( c->registered_urls ) )    return;    }    report_fatal("No configurations could open any ports. Will shutdown.\n");    restart(0.0, 50); /* Actually a shutdown, but... */   }