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

Comparing ircd-hybrid/trunk/src/conf_class.c (file contents):
Revision 5347 by michael, Sun Jan 11 12:42:20 2015 UTC vs.
Revision 5411 by michael, Sat Jan 24 19:12:59 2015 UTC

# Line 79 | Line 79 | class_init(void)
79    (class_default = class_make())->name = xstrdup("default");
80   }
81  
82 < struct ClassItem *
82 > const struct ClassItem *
83   get_class_ptr(const dlink_list *const list)
84   {
85    const dlink_node *const node = list->head;
# Line 100 | Line 100 | get_class_ptr(const dlink_list *const li
100   const char *
101   get_client_class(const dlink_list *const list)
102   {
103 <  const dlink_node *const node = list->head;
104 <
105 <  if (node)
106 <  {
107 <    const struct MaskItem *const conf = node->data;
108 <
109 <    assert(conf->class);
110 <    assert(conf->type & (CONF_OPER | CONF_CLIENT | CONF_SERVER));
111 <
112 <    return conf->class->name;
113 <  }
114 <
115 <  return class_default->name;
103 >  return get_class_ptr(list)->name;
104   }
105  
106   unsigned int
107   get_client_ping(const dlink_list *const list)
108   {
109 <  const dlink_node *const node = list->head;
122 <
123 <  if (node)
124 <  {
125 <    const struct MaskItem *const conf = node->data;
126 <
127 <    assert(conf->class);
128 <    assert(conf->type & (CONF_OPER | CONF_CLIENT | CONF_SERVER));
129 <
130 <    return conf->class->ping_freq;
131 <  }
132 <
133 <  return class_default->ping_freq;
109 >  return get_class_ptr(list)->ping_freq;
110   }
111  
112   unsigned int
113   get_sendq(const dlink_list *const list)
114   {
115 <  const dlink_node *const node = list->head;
140 <
141 <  if (node)
142 <  {
143 <    const struct MaskItem *const conf = node->data;
144 <
145 <    assert(conf->class);
146 <    assert(conf->type & (CONF_OPER | CONF_CLIENT | CONF_SERVER));
147 <
148 <    return conf->class->max_sendq;
149 <  }
150 <
151 <  return class_default->max_sendq;
115 >  return get_class_ptr(list)->max_sendq;
116   }
117  
118   unsigned int
119   get_recvq(const dlink_list *const list)
120   {
121 <  const dlink_node *const node = list->head;
158 <
159 <  if (node)
160 <  {
161 <    const struct MaskItem *const conf = node->data;
162 <
163 <    assert(conf->class);
164 <    assert(conf->type & (CONF_OPER | CONF_CLIENT | CONF_SERVER));
165 <
166 <    return conf->class->max_recvq;
167 <  }
168 <
169 <  return class_default->max_recvq;
121 >  return get_class_ptr(list)->max_recvq;
122   }
123  
124   /*

Diff Legend

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