Roxen.git / server / base_server / global_variables.pike

version» Context lines:

Roxen.git/server/base_server/global_variables.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2004, Roxen IS. - // $Id: global_variables.pike,v 1.111 2008/09/22 12:07:59 mast Exp $ + // $Id: global_variables.pike,v 1.112 2008/09/22 15:18:02 mast Exp $      // #pragma strict_types   #define DEFVAR mixed...:object   #define BDEFVAR mixed...:object      #define IN_ROXEN   #include <module.h>   inherit "read_config";   inherit "basic_defvar";   #include <version.h>
Roxen.git/server/base_server/global_variables.pike:22:      // The following three functions are used to hide variables when they   // are not used. This makes the user-interface clearer and quite a lot   // less clobbered.      private int(0..1) cache_disabled_p() { return !query("cache"); }   private int(0..1) syslog_disabled() { return query("LogA")!="syslog"; }   private int(0..1) ident_disabled_p() { return [int(0..1)]query("default_ident"); }      protected void cdt_changed (Variable.Variable v); - protected void set_slow_req_timeout (int t); + protected void set_slow_req_timeout (float t);      #ifdef SNMP_AGENT   private int(0..1) snmp_disabled() { return !query("snmp_agent"); }   private string snmp_get_cif_domain() {    //return(Standards.URI(roxenp()->configurations[0]->get_url()||"")->host);    return("");   }   #endif      // And why put these functions here, you might righfully ask.
Roxen.git/server/base_server/global_variables.pike:618:   minute intervals.</p>      <p>Note that this method normally isn't necessary in unix-like   environments; there you can just send a SIGQUIT signal to the pike   process to get a thread dump.</p>      <p>Enabling this creates a dedicated thread.</p>"));    v->set_changed_callback (cdt_changed);    defvar ("dump_threads_by_file", v);    -  defvar ("slow_req_bt", 0, +  defvar ("slow_req_bt", 0.0,    LOCALE(0, "Logging: Dump threads for slow requests"), -  TYPE_INT, +  TYPE_FLOAT,    LOCALE(0, #"\   <p>This setting enables a monitor that dumps all the threads in the   debug log whenever any request or background job has been running for   more than the set number of seconds. Zero disables the monitor.</p>      <p><b>Warning:</b> If you set this too low then the debug log can fill   up very quickly and the server become very slow due to the amount of   logging. If that happens and it gets difficult to change back the   value then you can add the define NO_SLOW_REQ_BT to disable this   feature at startup regardless of the timeout configured here.</p>      <p>Enabling this creates a dedicated thread.</p>"))    ->set_changed_callback (    lambda (Variable.Variable v) {   #ifndef NO_SLOW_REQ_BT -  int timeout = query ("slow_req_bt"); +  float timeout = query ("slow_req_bt");    v->set_warning (timeout < 0 &&    LOCALE(0, "Timeout cannot be negative.")); -  if (timeout >= 0) set_slow_req_timeout (timeout); +  if (timeout >= 0.0) set_slow_req_timeout (timeout);   #else    v->set_warning (    LOCALE(0, "Feature disabled by NO_SLOW_REQ_BT define."));   #endif    });      #ifdef THREADS    defvar("numthreads", 15, LOCALE(150, "Number of threads to run"),    TYPE_INT,    LOCALE(151, "The number of simultaneous threads Roxen will use.\n"