Roxen.git / server / base_server / global_variables.pike

version» Context lines:

Roxen.git/server/base_server/global_variables.pike:328: Inside #if constant(SSL.ServerConnection)
   LOCALE(0, "<p>Reject clients that want to use a "    "version of SSL/TLS lower than the selected "    "version.</p>\n")));   #endif /* SSL.ServerConnection */   }         // Get the current domain. This is not as easy as one could think.   string get_domain(int|void l)   { -  string t, s; +  string s = "nowhere"; +  string t;       // FIXME: NT support.       t = Stdio.read_bytes("/etc/resolv.conf"); -  if(t) -  { -  if(!sscanf(t, "domain %s\n", s)) -  if(!sscanf(t, "search %s%*[ \t\n]", s)) -  s="nowhere"; -  } else { -  s="nowhere"; +  if (!t) return s; +  +  if (!sscanf(t, "domain %s\n", s) && !sscanf(t, "search %s%*[ \t\n]", s)) { +  return s;    } -  s = "host."+s; -  sscanf(s, "%*s.%s", s); -  if(s && strlen(s)) -  { -  if(s[-1] == '.') s=s[..strlen(s)-2]; -  if(s[0] == '.') s=s[1..]; -  } else { -  s="unknown"; -  } +  +  if (has_prefix(s, ".")) s = s[1..]; +  if (has_suffix(s, ".")) s = s[..sizeof(s)-2]; +  if (!sizeof(s)) return "unknown"; +     return s;   }         class PortOptions   {    inherit Variable.Variable;    constant type = "PortOptions";       int check_visibility(RequestID id, int a, int b, int c, int d) { return 0; }
Roxen.git/server/base_server/global_variables.pike:903:    defvar("suicide_schedule",    Variable.Schedule( ({ 2, 1, 1, 0, 4 }), 0,    LOCALE(387,"Auto Restart: Schedule"),    LOCALE(388, "Automatically restart the "    "server according to this schedule.") ) )    ->set_invisibility_check_callback (    lambda(RequestID id, Variable.Variable f)    {return !query("suicide_engage");}    );    - #ifdef NEW_RAM_CACHE -  +     defvar ("mem_cache_gc_2", 5 * 60,    LOCALE(1045, "Cache: Memory cache GC interval"),    TYPE_INT,    LOCALE(1046, #"\   <p>Interval in seconds between RAM cache garbage collector runs. This   GC removes entries from the RAM caches that have timed out or are   stale for other reasons, thereby making more room for new entries. The   configured cache size limits are enforced when entries are added, so   this GC is not required to keep the cache sizes down.</p>   
Roxen.git/server/base_server/global_variables.pike:950: Inside #if defined(NEW_RAM_CACHE)
  optimal setting here is the one that in general keeps the Roxen   process at a size that avoids swapping and leaves enough memory for   buffers and other processes that need to run at the same time (e.g.   the Roxen instance of the MySQL server).</p>"));    v->set_range (1, Variable.no_limit);    v->set_changed_callback (    lambda (Variable.Int v) {    cache.set_total_size_limit (v->query() * 1024 * 1024);    });    - #else // !NEW_RAM_CACHE -  -  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 remembering " -  "what supports flags matches what client."))) -  ->set_range(1, 60*60*24); -  // Note that the upper limit is arbitrary. -  - #endif // !NEW_RAM_CACHE -  +     defvar("replicate", 0,    LOCALE(163, "Enable replication system" ),    TYPE_FLAG,    LOCALE(337,"If enabled, Roxen will enable various replication systems "    "needed to set up multiple frontend systems. You will need "    "a database named 'replicate' that resides in a shared mysql "    "server for this to work. Also, all servers has to have this "    "flag set. Roxen must be restarted before changes to this "    "variable takes effect." ) );   
Roxen.git/server/base_server/global_variables.pike:1078: Inside #if defined(SNMP_AGENT)
   defvar("snmp_sysservices",72,"SNMP: System MIB - Services",    TYPE_INT,    "A value which indicates the set of services that this entity "    "primarily offers.",    0, snmp_disabled);   #endif // SNMP_AGENT       defvar("global_position",    Variable.Variable(0, VAR_INVISIBLE));    + #ifdef ENABLE_OUTGOING_PROXY +  defvar("use_proxy", 0, +  LOCALE(1052, "Proxy: Use proxy (experimental)"), TYPE_FLAG, +  LOCALE(1053, "Use proxy for outgoing requests. E.g. when browsing " +  "external web sites through the Linkbrowser or when Insert " +  "cached-href fetches data from an external location.")); +  +  defvar("proxy_url", "", +  LOCALE(1054, "Proxy: Proxy URL"), TYPE_STRING, +  LOCALE(1055, "The URL of the proxy to use for outgoing requests.")); +  +  defvar("proxy_username", "", +  LOCALE(1056, "Proxy: Proxy username"), TYPE_STRING, +  LOCALE(1057, "Username for proxy authorization.")); +  +  defvar("proxy_password", "", +  LOCALE(1058, "Proxy: Proxy password"), TYPE_STRING, +  LOCALE(1059, "Password for proxy authorization.")); + #endif   }         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 );