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.109 2008/05/07 11:02:41 mast Exp $ + // $Id: global_variables.pike,v 1.110 2008/08/15 12:33:53 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:21:   }      // 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"); }    - static void cdt_changed (Variable v); + protected void cdt_changed (Variable.Variable v);      #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()||"http://0.0.0.0")->host);    return("");   }   #endif      // And why put these functions here, you might righfully ask.
Roxen.git/server/base_server/global_variables.pike:591: Inside #if efun(syslog)
   syslog_disabled);       defvar("LogNA", "Roxen", LOCALE(148, "Logging: Log as"),    TYPE_STRING,    LOCALE(149, "When syslog is used, this will be the identification "    "of the Roxen daemon. The entered value will be appended to "    "all logs."),    0, syslog_disabled);   #endif // efun(syslog)    -  Variable v = Variable.Flag (0, 0, +  Variable.Variable v = +  Variable.Flag (0, 0,    LOCALE(534, "Logging: Dump threads by file polling"),    LOCALE(535, #"\   <p>This option can be used to produce dumps of all the threads in the   debug log in situations where the Administration Interface doesn't   respond.</p>      <p>It works by checking for a file called \"<i>&lt;config   name&gt;</i>.dump_threads\" in the same directory as the debug log.   <i>&lt;config name&gt;</i> is the name of the server configuration,   i.e. the same as the base name of the debug log files (typically
Roxen.git/server/base_server/global_variables.pike:667:    "messages in Roxen. Standard means using "    "the default locale, which varies "    "according to the values of "    "the 'LC_MESSAGES' and 'LANG' environment "    "variables.")))    ->set_changed_callback( lambda(Variable.Variable s) {    roxenp()->set_default_locale(query("locale"));    roxenp()->set_locale();    } );    -  string secret=Crypto.md5()->update(""+time(1)+random(100000))->digest(); +  string secret=Crypto.MD5()->update(""+time(1)+random(100000))->digest();    secret = MIME.encode_base64(secret,1);    defvar("server_salt", secret[..sizeof(secret)-3], LOCALE(8, "Server secret"),    TYPE_STRING|VAR_MORE|VAR_NO_DEFAULT,    LOCALE(9, "The server secret is a string used in some "    "cryptographic functions, such as calculating "    "unique, non-guessable session id's. Change this "    "value into something that is hard to guess, unless "    "you are satisfied with what your computers random "    "generator has produced.") );    -  secret = Crypto.md5()->update(""+time(1)+random(100000)+"x"+gethrtime()) +  secret = Crypto.MD5()->update(""+time(1)+random(100000)+"x"+gethrtime())    ->digest();       definvisvar("argcache_secret","",TYPE_STRING|VAR_NO_DEFAULT);    set( "argcache_secret", secret );    // force save.          defvar("suicide_engage", 0,    LOCALE(160, "Auto Restart: Enable Automatic Restart"),    TYPE_FLAG|VAR_MORE,
Roxen.git/server/base_server/global_variables.pike:844:      void restore_global_variables()   {    mapping m = retrieve("Variables", 0);    setvars(retrieve("Variables", 0));    if( !m->argcache_secret ) save();    old_module_dirs = query( "ModuleDirs" );    getvar( "ModuleDirs" )->add_changed_callback( zap_all_module_caches );   }    - static mapping(string:mixed) __vars = ([ ]); + protected mapping(string:mixed) __vars = ([ ]);      // These two should be documented somewhere. They are to be used to   // set global, but non-persistent, variables in Roxen.   mixed set_var(string var, mixed to)   {    return __vars[var] = to;   }      mixed query_var(string var)   {    return __vars[var];   }