Branch: Tag:

2001-07-18

2001-07-18 21:10:04 by Honza Petrous <hop@unibase.cz>

Again rather big rewrite. The moving to the more OOB variant is a little bit evident here. Preparation for simple SNMPmanager object skeleton usage.

Rev: server/base_server/configuration.pike:1.450
Rev: server/base_server/snmpagent.pike:1.5

3:   //   // A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.449 2001/07/12 21:22:35 mast Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.450 2001/07/18 21:10:03 hop Exp $";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>
3173:    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 +  // Cold start trap after real virt.serv. loading +  if(objectp(roxen->snmpagent)) +  roxen->snmpagent->coldstart_trap(({ get_config_id() })); + #endif +    }      DataCache datacache;
3527: 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 hosts", TYPE_STRING_LIST, +  "The remote nodes, where should be sent traps.", 0, snmp_disabled);       if (query("snmp_process")) {    if(objectp(roxen()->snmpagent)) {    int servid;    servid = roxen()->snmpagent->add_virtserv();    // 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
3550: Inside #if defined(SNMP_AGENT)
  private static int(0..1) snmp_disabled() {    return (!snmp_global_disabled() && !query("snmp_process"));   } - private static int(0..1) snmp_global_disabled() { (!objectp(roxen->snmpagent)); } + private static int(0..1) snmp_global_disabled() { +  return (!objectp(roxen->snmpagent)); + }   #endif