ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/modules.c
(Generate patch)

Comparing ircd-hybrid-8/src/modules.c (file contents):
Revision 1237 by michael, Thu Sep 29 11:32:21 2011 UTC vs.
Revision 1238 by michael, Thu Sep 29 11:37:31 2011 UTC

# Line 40 | Line 40
40   #include "memory.h"
41  
42  
43 < dlink_list mod_list = { NULL, NULL, 0 };
44 <
43 > static dlink_list modules_list = { NULL, NULL, 0 };
44  
45   static const char *unknown_ver = "<unknown>";
46  
# Line 122 | Line 121 | unload_one_module(const char *name, int
121    if (modp->modexit)
122     modp->modexit();
123  
124 <  assert(dlink_list_length(&mod_list) > 0);
125 <  dlinkDelete(&modp->node, &mod_list);
124 >  assert(dlink_list_length(&modules_list) > 0);
125 >  dlinkDelete(&modp->node, &modules_list);
126    MyFree(modp->name);
127  
128    lt_dlclose(modp->handle);
# Line 180 | Line 179 | load_a_module(const char *path, int warn
179      modp->flags |= MODULE_FLAG_CORE;
180  
181    DupString(modp->name, mod_basename);
182 <  dlinkAdd(modp, &modp->node, &mod_list);
182 >  dlinkAdd(modp, &modp->node, &modules_list);
183  
184    if (modp->modinit)
185      modp->modinit();
# Line 321 | Line 320 | findmodule_byname(const char *name)
320   {
321    dlink_node *ptr = NULL;
322  
323 <  DLINK_FOREACH(ptr, mod_list.head)
323 >  DLINK_FOREACH(ptr, modules_list.head)
324    {
325      struct module *modp = ptr->data;
326  
# Line 579 | Line 578 | mo_modlist(struct Client *client_p, stru
578      return;
579    }
580  
581 <  DLINK_FOREACH(ptr, mod_list.head)
581 >  DLINK_FOREACH(ptr, modules_list.head)
582    {
583      const struct module *modp = ptr->data;
584  
# Line 613 | Line 612 | mo_modrestart(struct Client *client_p, s
612    sendto_one(source_p, ":%s NOTICE %s :Reloading all modules",
613               me.name, source_p->name);
614  
615 <  modnum = dlink_list_length(&mod_list);
615 >  modnum = dlink_list_length(&modules_list);
616  
617 <  DLINK_FOREACH_SAFE(ptr, ptr_next, mod_list.head)
617 >  DLINK_FOREACH_SAFE(ptr, ptr_next, modules_list.head)
618    {
619      struct module *modp = ptr->data;
620      unload_one_module(modp->name, 0);
# Line 627 | Line 626 | mo_modrestart(struct Client *client_p, s
626  
627    sendto_realops_flags(UMODE_ALL, L_ALL,
628                "Module Restart: %u modules unloaded, %u modules loaded",
629 <                        modnum, dlink_list_length(&mod_list));
629 >                        modnum, dlink_list_length(&modules_list));
630    ilog(L_WARN, "Module Restart: %u modules unloaded, %u modules loaded",
631 <       modnum, dlink_list_length(&mod_list));
631 >       modnum, dlink_list_length(&modules_list));
632   }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)