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/trunk/src/modules.c (file contents):
Revision 4814 by michael, Sun Aug 24 10:27:40 2014 UTC vs.
Revision 4815 by michael, Sat Nov 1 15:28:42 2014 UTC

# Line 202 | Line 202 | modules_init(void)
202   static struct module_path *
203   mod_find_path(const char *path)
204   {
205 <  dlink_node *ptr = NULL;
205 >  dlink_node *node = NULL;
206  
207 <  DLINK_FOREACH(ptr, modules_path.head)
207 >  DLINK_FOREACH(node, modules_path.head)
208    {
209 <    struct module_path *mpath = ptr->data;
209 >    struct module_path *mpath = node->data;
210  
211      if (!strcmp(path, mpath->path))
212        return mpath;
# Line 261 | Line 261 | add_conf_module(const char *name)
261   void
262   mod_clear_paths(void)
263   {
264 <  dlink_node *ptr = NULL, *ptr_next = NULL;
264 >  dlink_node *node = NULL, *node_next = NULL;
265  
266 <  DLINK_FOREACH_SAFE(ptr, ptr_next, modules_path.head)
266 >  DLINK_FOREACH_SAFE(node, node_next, modules_path.head)
267    {
268 <    dlinkDelete(ptr, &modules_path);
269 <    MyFree(ptr->data);
268 >    dlinkDelete(node, &modules_path);
269 >    MyFree(node->data);
270    }
271  
272 <  DLINK_FOREACH_SAFE(ptr, ptr_next, modules_conf.head)
272 >  DLINK_FOREACH_SAFE(node, node_next, modules_conf.head)
273    {
274 <    dlinkDelete(ptr, &modules_conf);
275 <    MyFree(ptr->data);
274 >    dlinkDelete(node, &modules_conf);
275 >    MyFree(node->data);
276    }
277   }
278  
# Line 285 | Line 285 | mod_clear_paths(void)
285   struct module *
286   findmodule_byname(const char *name)
287   {
288 <  dlink_node *ptr = NULL;
288 >  dlink_node *node = NULL;
289  
290 <  DLINK_FOREACH(ptr, modules_list.head)
290 >  DLINK_FOREACH(node, modules_list.head)
291    {
292 <    struct module *modp = ptr->data;
292 >    struct module *modp = node->data;
293  
294      if (!strcmp(modp->name, name))
295        return modp;
# Line 340 | Line 340 | load_all_modules(int warn)
340   void
341   load_conf_modules(void)
342   {
343 <  dlink_node *ptr = NULL;
343 >  dlink_node *node = NULL;
344  
345 <  DLINK_FOREACH(ptr, modules_conf.head)
345 >  DLINK_FOREACH(node, modules_conf.head)
346    {
347 <    struct module_path *mpath = ptr->data;
347 >    struct module_path *mpath = node->data;
348  
349      if (findmodule_byname(mpath->path) == NULL)
350        load_one_module(mpath->path);
# Line 386 | Line 386 | load_core_modules(int warn)
386   int
387   load_one_module(const char *name)
388   {
389 <  dlink_node *ptr = NULL;
389 >  dlink_node *node = NULL;
390    char path[HYB_PATH_MAX + 1];
391    struct stat statbuf;
392  
393 <  DLINK_FOREACH(ptr, modules_path.head)
393 >  DLINK_FOREACH(node, modules_path.head)
394    {
395 <    const struct module_path *mpath = ptr->data;
395 >    const struct module_path *mpath = node->data;
396  
397      snprintf(path, sizeof(path), "%s/%s", mpath->path, name);
398  

Diff Legend

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