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 - 2000, Roxen IS. - // $Id: global_variables.pike,v 1.57 2001/01/06 07:24:26 nilsson Exp $ + // $Id: global_variables.pike,v 1.58 2001/01/13 17:43:28 nilsson Exp $      /*   #pragma strict_types   */   #define DEFVAR mixed...:object   #define BDEFVAR mixed...:object      #define IN_ROXEN   #include <module.h>   inherit "read_config";
Roxen.git/server/base_server/global_variables.pike:19:      mixed save()   {    store( "Variables", variables, 0, 0 );   }      // 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 cache_disabled_p() { return !QUERY(cache); } - private int syslog_disabled() { return QUERY(LogA)!="syslog"; } - private int ident_disabled_p() { return [int(0..1)]QUERY(default_ident); } + 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"); }         // And why put these functions here, you might righfully ask.      // The answer is that there is actually a reason for it, it's for   // performance reasons. This file is dumped to a .o file, roxen.pike   // is not.   void set_up_hilfe_variables( object o )   {    function(DEFVAR) defvar = [function(DEFVAR)] o->defvar;
Roxen.git/server/base_server/global_variables.pike:110:    "individual users."));       defvar("set_cookie_only_once", 1,    LOCALE(76, "Logging: Set ID cookies only once"),    TYPE_FLAG,    LOCALE(77, "If set to Yes, Roxen will attempt to set unique user "    "ID cookies only upon receiving the first request (and "    "again after some minutes). Thus, if the user doesn't allow "    "the cookie to be set, she won't be bothered with "    "multiple requests."),0 , -  lambda() {return !QUERY(set_cookie);}); +  lambda() {return !query("set_cookie");});    }   }      void set_up_fhttp_variables( object o )   {    function(BDEFVAR) defvar =    [function(BDEFVAR)] o->defvar;       defvar( "log", "None", LOCALE(78, "Logging method"),    TYPE_STRING_LIST,
Roxen.git/server/base_server/global_variables.pike:516: Inside #if undefined(__NT__)
   "blocked. In general there is no harm in having this option enabled. "));       defvar("abs_timeout", 5, LOCALE(156, "ABS: Timeout"),    TYPE_INT_LIST|VAR_MORE,    LOCALE(157, "If the server is unable to accept connection for this many "    "minutes, it will be restarted. You need to find a balance: "    "if set too low, the server will be restarted even if it's doing "    "legal things (like generating many images), if set too high you might "    "get a long downtime if the server for some reason locks up."),    ({1,2,3,4,5,10,15}), -  lambda() {return !QUERY(abs_engage);}); +  lambda() {return !query("abs_engage");});   #endif // __NT__       defvar("locale",    Variable.Language("Standard", ({ "Standard" }) +    Locale.list_languages("roxen_config"),    0, LOCALE(158, "Default language"),    LOCALE(159, "Locale, used to localize all "    "messages in Roxen. Standard means using "    "the default locale, which varies "    "according to the value of "    "the 'LANG' environment variable.")))    ->set_changed_callback( lambda(Variable.Variable s) { -  roxenp()->set_default_locale(QUERY(locale)); +  roxenp()->set_default_locale(query("locale"));    roxenp()->set_locale();    } );       string secret=Crypto.md5()->update(""+time(1)+random(100000))->digest();    secret = MIME.encode_base64(secret,1);    defvar("server_salt", secret[..sizeof(secret)-3], LOCALE(0, "Server secret"),    TYPE_STRING|VAR_MORE,    LOCALE(0, "The server secret is a string used in some "    "cryptographic functions, such as calculating "    "unique, non-guessable session id's. Change this "
Roxen.git/server/base_server/global_variables.pike:559:    "non-forking server model the process tends to grow in size "    "over time. This is mainly due to heap fragmentation but also "    "because of memory leaks.")    );       defvar("suicide_timeout", 7,    LOCALE(162, "Auto Restart: Timeout"),    TYPE_INT_LIST|VAR_MORE,    LOCALE(163, "Automatically restart the server after this many days."),    ({1,2,3,4,5,6,7,14,30}), -  lambda(){return !QUERY(suicide_engage);}); +  lambda(){return !query("suicide_engage");});       defvar("mem_cache_gc",    Variable.Int(300, 0,    LOCALE(170, "Cache: Memory Cache Garbage Collect Interval"),    LOCALE(171, "The number of seconds between every garbage collect "    "(removal of old content) from the memory cache. The "    "memory cache is used for various tasks like remebering "    "what supports flags matches what client.")))    ->set_range(1, 60*60*24);    // Note that the upper limit is arbitrary.