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 * |
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; |
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; |
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) |
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) |