/[svn]/ircd-hybrid/trunk/src/conf_class.c
ViewVC logotype

Diff of /ircd-hybrid/trunk/src/conf_class.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1649 by michael, Fri Nov 9 20:11:58 2012 UTC revision 1650 by michael, Sat Nov 10 20:57:51 2012 UTC
# Line 72  class_make(void) Line 72  class_make(void)
72  {  {
73    struct ClassItem *class = MyMalloc(sizeof(*class));    struct ClassItem *class = MyMalloc(sizeof(*class));
74    
75      class->active    = 1;
76      class->con_freq  = DEFAULT_CONNECTFREQUENCY;
77      class->ping_freq = DEFAULT_PINGFREQUENCY;
78      class->max_total = MAXIMUM_LINKS_DEFAULT;
79      class->max_sendq = DEFAULT_SENDQ;
80      class->max_recvq = DEFAULT_RECVQ;
81    
82    dlinkAdd(class, &class->node, &class_list);    dlinkAdd(class, &class->node, &class_list);
83    
84    return class;    return class;
# Line 92  class_free(struct ClassItem *class) Line 99  class_free(struct ClassItem *class)
99  void  void
100  class_init(void)  class_init(void)
101  {  {
102    class_default = class_make();    (class_default = class_make())->name = xstrdup("default");
   
   class_default->name      = xstrdup("default");  
   class_default->active    = 1;  
   class_default->con_freq  = DEFAULT_CONNECTFREQUENCY;  
   class_default->ping_freq = DEFAULT_PINGFREQUENCY;  
   class_default->max_total = MAXIMUM_LINKS_DEFAULT;  
   class_default->max_sendq = DEFAULT_SENDQ;  
   class_default->max_recvq = DEFAULT_RECVQ;  
103  }  }
104    
105  const char *  const char *
# Line 200  class_mark_for_deletion(void) Line 199  class_mark_for_deletion(void)
199  {  {
200    dlink_node *ptr = NULL;    dlink_node *ptr = NULL;
201    
202    DLINK_FOREACH(ptr, class_list.head)    DLINK_FOREACH_PREV(ptr, class_list.tail->prev)
203    {      ((struct ClassItem *)ptr->data)->active = 0;
     struct ClassItem *class = ptr->data;  
   
     if (class != class_default)  
       class->active = 0;  
   }  
204  }  }
205    
206  void  void

Legend:
Removed from v.1649  
changed lines
  Added in v.1650

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28