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 - 2004, Roxen IS.   //      // @appears Configuration   //! A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.669 2009/04/01 14:59:50 jonasw Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.670 2009/04/02 13:13:20 grubba 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)      // Tell Pike.count_memory this is global.   constant pike_cycle_depth = 0;
Roxen.git/server/base_server/configuration.pike:5007:    void set( string newval )    {    if( search(newval,"emit source=values") == -1 )    variables[ "404-message" ]->set( newval );    }       void create()    {    ::create(   #"<nooutput><emit source=values scope=ef variable='modvar.site.404-files'> +  <if not='' variable='ef.value is '>    <set variable='var.base' value=''/>    <emit source='path'>    <append variable='var.base' value='/&_.name;'/>    <set variable='var.404' value='&var.base;/&ef.value;'/>    <if exists='&var.404;'>    <set variable='var.errfile' from='var.404'/>    </if>    </emit> -  +  </if>   </emit>   </nooutput><if variable='var.errfile'><eval><insert file='&var.errfile;?orig-url=&page.url:url;&amp;orig-file=&page.virtfile:url;'/></eval></if><else><eval>&modvar.site.404-message:none;</eval></else>", 0, 0, 0 );    }    };       defvar("ZNoSuchFile", NoSuchFileOverride() );       defvar("404-message", #"<html>   <head>    <title>404 - Page Not Found</title>
Roxen.git/server/base_server/configuration.pike:5127:    void set( string newval )    {    if( search(newval,"emit source=values") == -1 )    variables[ "401-message" ]->set( newval );    }       void create()    {    ::create(   #"<nooutput><emit source=values scope=ef variable='modvar.site.401-files'> +  <if not='' variable='ef.value is '>    <set variable='var.base' value=''/>    <emit source='path'>    <append variable='var.base' value='/&_.name;'/>    <set variable='var.401' value='&var.base;/&ef.value;'/>    <if exists='&var.401;'>    <set variable='var.errfile' from='var.401'/>    </if>    </emit> -  +  </if>   </emit>   </nooutput><if variable='var.errfile'><eval><insert file='&var.errfile;?orig-url=&page.url:url;&amp;orig-file=&page.virtfile:url;'/></eval></if><else><eval>&modvar.site.401-message:none;</eval></else>", 0, 0, 0 );    }    };       defvar("ZAuthFailed", AuthFailedOverride() );       defvar("401-message", #"<html>   <head>    <title>401 - Authentication Failed</title>
Roxen.git/server/base_server/configuration.pike:5243: Inside #if defined(SNMP_AGENT)
   "The community string and access level for manipulation on server "    " specific objects.",    0, snmp_disabled);    defvar("snmp_traphosts", ({ }),    "SNMP: Trap host URLs", TYPE_STRING_LIST,    "The remote nodes, where should be sent traps."    "<p>\n"    "The URL syntax is: snmptrap://community@hostname:portnumber"    "</p><br/>",    0, snmp_disabled); -  -  if (query("snmp_process")) { -  if(objectp(roxen()->snmpagent)) { -  int servid; -  servid = roxen()->snmpagent->add_virtserv(get_config_id()); -  // todo: make invisible varibale and set it to this value for future reference -  // (support for per-reload persistence of server index?) -  } else -  report_error("SNMPagent: something gets wrong! The main agent is disabled!\n"); } +    #endif       definvisvar( "no_delayed_load", 0, TYPE_FLAG|VAR_PUBLIC );      // report_debug("[defvar: %.1fms] ", (gethrtime()-st)/1000.0 );   // st = gethrtime();       mapping(string:mixed) retrieved_vars = retrieve("spider#0", this_object());    if (sizeof (retrieved_vars) && !retrieved_vars->compat_level)    // Upgrading an older configuration; default to 2.1 compatibility level.    set ("compat_level", "2.1");    setvars( retrieved_vars );      // report_debug("[restore: %.1fms] ", (gethrtime()-st)/1000.0 ); -  +  + #ifdef SNMP_AGENT +  if (query("snmp_process")) { +  if(objectp(roxen()->snmpagent)) { +  int servid; +  servid = roxen()->snmpagent->add_virtserv(get_config_id()); +  // todo: make invisible varibale and set it to this value for future reference +  // (support for per-reload persistence of server index?) +  } else +  report_error("SNMPagent: something gets wrong! The main agent is disabled!\n");    } -  + #endif + }      protected int arent_we_throttling_server () {    return !query("throttle");   }   protected int arent_we_throttling_request() {    return !query("req_throttle");   }      #ifdef SNMP_AGENT   private int(0..1) snmp_disabled() {    return (!snmp_global_disabled() && !query("snmp_process"));   }   private int(0..1) snmp_global_disabled() {    return (!objectp(roxen->snmpagent));   }   #endif