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 1636 by michael, Sun Nov 4 17:09:47 2012 UTC vs.
Revision 1644 by michael, Tue Nov 6 22:20:16 2012 UTC

# Line 102 | Line 102 | class_init(void)
102    class_default->max_total = MAXIMUM_LINKS_DEFAULT;
103    class_default->max_sendq = DEFAULT_SENDQ;
104    class_default->max_recvq = DEFAULT_RECVQ;
105
106  client_check_cb = register_callback("check_client", check_client);
105   }
106  
107   const char *
# Line 124 | Line 122 | get_client_class(const dlink_list *const
122   }
123  
124   unsigned int
125 < get_client_ping(const dlink_list *const list, int *pingwarn)
125 > get_client_ping(const dlink_list *const list)
126   {
127    const dlink_node *ptr = NULL;
130  int ping = 0;
128  
129    if ((ptr = list->head)) {
130      const struct MaskItem *conf = ptr->data;
# Line 135 | Line 132 | get_client_ping(const dlink_list *const
132      assert(aconf->class);
133      assert(aconf->type & (CONF_OPERATOR | CONF_CLIENT | CONF_SERVER));
134  
135 <    ping = get_conf_ping(conf, pingwarn);
139 <    if (ping > 0)
140 <      return ping;
135 >    return conf->class->ping_freq;
136    }
137  
138    return class_default->ping_freq;
# Line 248 | Line 243 | cidr_limit_reached(int over_rule,
243    dlink_node *ptr = NULL;
244    struct CidrItem *cidr = NULL;
245  
246 <  if (class->number_per_cidr <= 0)
246 >  if (class->number_per_cidr == 0)
247      return 0;
248  
249    if (ip->ss.ss_family == AF_INET)
250    {
251 <    if (class->cidr_bitlen_ipv4 <= 0)
251 >    if (class->cidr_bitlen_ipv4 == 0)
252        return 0;
253  
254      DLINK_FOREACH(ptr, class->list_ipv4.head)
# Line 317 | Line 312 | remove_from_cidr_check(struct irc_ssaddr
312  
313    if (ip->ss.ss_family == AF_INET)
314    {
315 <    if (aclass->cidr_bitlen_ipv4 <= 0)
315 >    if (aclass->cidr_bitlen_ipv4 == 0)
316        return;
317  
318      DLINK_FOREACH_SAFE(ptr, next_ptr, aclass->list_ipv4.head)

Diff Legend

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