Branch: Tag:

1999-11-19

1999-11-19 18:07:08 by Per Hedbor <ph@opera.com>

Added reload capabilities

Rev: server/base_server/configuration.pike:1.224
Rev: server/base_server/roxen.pike:1.353
Rev: server/config_interface/standard/inheritinfo.pike:1.3
Rev: server/config_interface/standard/sites/site_content.pike:1.8

3:    * (C) 1996, 1999 Idonex AB.    */    - constant cvs_version = "$Id: configuration.pike,v 1.223 1999/11/19 02:04:16 per Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.224 1999/11/19 18:07:03 per Exp $";   constant is_configuration = 1;   #include <module.h>   #include <roxen.h>
2175:    return 1;   }    + object reload_module( string modname ) + { +  werror( "reloading " + modname + "\n"); +  foreach( Program.inherit_list(object_program(find_module( modname ))), +  program p ) +  { +  while( string ind = search( master()->programs, p ) ) +  { +  roxen->old_programs[ p ] = ind; +  m_delete( master()->programs, ind ); +  } +  } +  string ind = search( master()->programs, +  object_program(find_module(modname))); +  m_delete( master()->programs, ind ); +  rm( ind+".o" ); +  return enable_module( modname ); + } +    object enable_module( string modname )   {    int id;
2186:    int module_type;       if( sscanf(modname, "%s#%d", modname, id ) != 2 ) -  /* here we go again... */ +     while( modules[modname] && modules[modname]->copies[id] )    id++;