Branch: Tag:

2000-11-17

2000-11-17 23:23:19 by Martin Nilsson <mani@lysator.liu.se>

Reload the supports cache when the supports definition is changed. [Bug 749 (#749)]

Rev: server/base_server/global_variables.pike:1.49

1:   // This file is part of Roxen Webserver.   // Copyright © 1996 - 2000, Roxen IS. - // $Id: global_variables.pike,v 1.48 2000/10/19 12:24:02 per Exp $ + // $Id: global_variables.pike,v 1.49 2000/11/17 23:23:19 nilsson Exp $      /*   #pragma strict_types
429:    "directory you started Roxen. "    "The directories are searched in order for modules."));    -  defvar("Supports", "#include <etc/supports>\n", -  LOCALE(134, "Client supports regexps"), -  TYPE_TEXT_FIELD|VAR_MORE, +  defvar("Supports", +  Variable.Text( "#include <etc/supports>\n", +  VAR_MORE, LOCALE(134, "Client supports regexps"),    LOCALE(135, "What do the different clients support?\n<br />"    "The default information is normally fetched from the file " -  "server/etc/supports in your Roxen directory.")); +  "server/etc/supports in your Roxen directory.") ) ) +  -> add_changed_callback( lambda(Variable.Text s) { +  roxenp()->initiate_supports(); +  cache.cache_expire("supports"); +  } );       defvar("audit", 0, LOCALE(136, "Logging: Audit trail"),    TYPE_FLAG,
487: Inside #if efun(syslog)
   "of the Roxen daemon. The entered value will be appended to "    "all logs."),    0, syslog_disabled); - #endif + #endif // efun(syslog)      #ifdef THREADS    defvar("numthreads", 5, LOCALE(150, "Number of threads to run"),
498: Inside #if defined(THREADS)
   "system.\n"    "<i>This is quite useful if you have more than one CPU in "    "your machine, or if you have a lot of slow NFS accesses.</i></p>")); - #endif + #endif // THREADS    - #if 0 -  defvar("AutoUpdate", 1, -  LOCALE(152, "Update the supports database automatically"), -  TYPE_FLAG, -  LOCALE(153, "If set to Yes, the etc/supports file will be updated " -  "automatically from www.roxen.com now and then. This is " -  "recomended, since you will then automatically get supports " -  "information for new clients, and new versions of old ones.")); -  -  defvar("next_supports_update", time(1)+3600, "", TYPE_INT,"",0,1); - #endif -  +    #ifndef __NT__    defvar("abs_engage", 0, LOCALE(154, "ABS: Enable Anti-Block-System"),    TYPE_FLAG|VAR_MORE,
531: Inside #if undefined(__NT__)
   "get a long downtime if the server for some reason locks up."),    ({1,2,3,4,5,10,15}),    lambda() {return !QUERY(abs_engage);}); - #endif + #endif // __NT__       defvar("locale",    Variable.Language("Standard", ({ "Standard" }) +