Branch: Tag:


2021-04-07 14:45:17 by Henrik Grubbström (Grubba) <>

basic_defvar: Set the path for variables automatically.

Call set_path() in all variables defined via defvar().
set_path() was documented as being called from the configuration
interface, but no such code actually existed.

The path used for set_path() is derived from module_identifier()
and the variable name.

Adds module_identifier() to all places that use basic_defvar that
did not already have it.

Fixes [REP-111].

6:   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.998 2008/11/04 18:01:32 mast Exp $"; + constant cvs_version="$Id$";      //! @appears roxen   //!
1692:    mapping(Configuration:mapping(string:mixed)) conf_data = ([]);    //! Maps the configuration objects to the data mappings in @[urls].    +  //! Used by basic_defvar. +  string module_identifier() +  { +  return sprintf("_Ports/%s/%d", ip || "ANY", port); +  } +     void ref(string name, mapping(string:mixed) data)    //! Add a ref for the URL 'name' with the data 'data'    {