Branch: Tag:

2007-05-31

2007-05-31 13:15:01 by Martin Stjernholm <mast@lysator.liu.se>

Avoid false alarms also when modules are reloaded. (Mostly change of
indentation.)

Rev: server/base_server/configuration.pike:1.635

5:   // @appears Configuration   //! A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.634 2007/05/30 12:40:05 mast Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.635 2007/05/31 13:15:01 mast Exp $";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>
3291:       if( !old_module ) return 0;    +  // Temporarily shift out of the rxml parsing context if we're inside +  // any (e.g. due to delayed loading from inside the admin +  // interface). +  RXML.Context old_ctx = RXML.get_context(); +  RXML.set_context (0); +  mixed err = catch { +     master()->clear_compilation_failures();       if( !old_module->not_a_module )
3310:    if( nm->not_a_module )    {    old_module->report_error(LOC_C(385,"Reload failed")+"\n"); +  RXML.set_context (old_ctx);    return old_module;    }   
3327:    // destructed. /mast    report_error (err);    report_error(LOC_C(385,"Reload failed")+"\n"); +  RXML.set_context (old_ctx);    return 0; // Use a placeholder module instead?    }    else
3337:    nm->error_log[msg] += times;       nm->report_notice(LOC_C(11, "Reloaded %s.")+"\n", mi->get_name()); +  RXML.set_context (old_ctx);    return nm; -  +  +  }; +  RXML.set_context (old_ctx); +  if (err) throw (err);   }      #ifdef THREADS