Branch: Tag:

1998-05-09

1998-05-09 17:06:51 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed module enabling bug.

Rev: server/base_server/configuration.pike:1.130

1: - string cvs_version = "$Id: configuration.pike,v 1.129 1998/05/09 15:48:50 grubba Exp $"; + string cvs_version = "$Id: configuration.pike,v 1.130 1998/05/09 17:06:51 grubba Exp $";   #include <module.h>   #include <roxen.h>   
2138: Inside #if constant(gethrtime)
  #if constant(gethrtime)    int start_time = gethrtime();   #endif -  if( module ) -  { +  if (!module) { +  return 0; +  } +     object me;    mapping tmp;    int pr;
2290:    })) {    report_error("Error while initiating module copy of " +    module->name + "\n" + describe_backtrace(err)); +  +  /* Clean up some broken references to this module. */ +  m_delete(otomod, me); +  +  if(module->copies) +  m_delete(module->copies, (int)id); +  else +  m_delete(module, "enabled"); +     destruct(me); -  +     return 0;    }   
2362:    {    parse_module = me;    if (_toparse_modules) { -  Array.map(_toparse_modules, lambda(object o, object me, mapping module) +  Array.map(_toparse_modules, +  lambda(object o, object me, mapping module)    {    array err; -  if (err = catch{me->add_parse_module(o);}) { +  if (err = catch { +  me->add_parse_module(o); +  }) {    report_error("Error while initiating module copy of " + -  module->name + "\n" + describe_backtrace(err)); +  module->name + "\n" + +  describe_backtrace(err));    }    }, me, module);    }
2436:   #endif    return me;    } -  return 0; - } +       // Called from the configuration interface.   string check_variable(string name, string value)