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.633 2008/03/19 14:06:47 grubba Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.634 2008/04/07 13:04:47 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)      // --- Locale defines ---   //<locale-token project="roxen_start"> LOC_S </locale-token>
Roxen.git/server/base_server/configuration.pike:4198:    if (!modules_already_enabled)    report_notice(LOC_S(4, "All modules for %s enabled in %3.1f seconds") +    "\n\n", query_name(), (gethrtime()-start_time)/1000000.0);      #ifdef SNMP_AGENT    // Start trap after real virt.serv. loading    if(query("snmp_process") && objectp(roxen->snmpagent))    roxen->snmpagent->vs_start_trap(get_config_id());   #endif    +  foreach(registered_urls, string url) { +  mapping(string:string|Configuration|Protocol) port_info = roxen.urls[url]; +  +  foreach((port_info && port_info->ports) || ({}), Protocol prot) { +  if ((prot->prot_name != "snmp") || (!prot->mib)) { +  continue;    }    -  +  string path = port_info->path || ""; +  if (has_prefix(path, "/")) { +  path = path[1..]; +  } +  if (has_suffix(path, "/")) { +  path = path[..sizeof(path)-2]; +  } +  +  array(int) oid_suffix = ({ sizeof(path), @((array(int))path) }); +  +  ADT.Trie mib = +  SNMP.SimpleMIB(query_oid(), oid_suffix, +  ({ +  UNDEFINED, +  UNDEFINED, +  SNMP.String(query_name, "siteName"), +  SNMP.String(comment, "siteComment"), +  SNMP.Counter64(lambda() { return sent; }, +  "sent"), +  SNMP.Counter64(lambda() { return received; }, +  "received"), +  SNMP.Counter64(lambda() { return hsent; }, +  "sentHeaders"), +  SNMP.Counter64(lambda() { return requests; }, +  "numRequests"), +  UNDEFINED, // NOTE: Reserved for modules! +  })); +  SNMP.set_owner(mib, this_object()); +  prot->mib->merge(mib); +  } +  } + } +    DataCache datacache;      static void create()   {    if (!name) error ("Configuration name not set through bootstrap_info.\n");   // int st = gethrtime();    roxen.add_permission( "Site:"+name, LOC_C(306,"Site")+": "+name );       // for now only these two. In the future there might be more variables.    defvar( "data_cache_size", 131072, DLOCALE(274, "Cache:Cache size"),