class.c fixed possibly
This commit is contained in:
parent
bdbe991f53
commit
4964011f8a
1 changed files with 23 additions and 23 deletions
46
src/class.c
46
src/class.c
|
@ -44,31 +44,31 @@
|
||||||
rb_dlink_list class_list;
|
rb_dlink_list class_list;
|
||||||
struct Class *default_class;
|
struct Class *default_class;
|
||||||
|
|
||||||
struct Class *
|
struct Class *
|
||||||
make_class(void)
|
make_class(void)
|
||||||
{
|
{
|
||||||
struct Class *tmp;
|
struct Class *tmp;
|
||||||
|
|
||||||
tmp = (struct Class *) rb_malloc(sizeof(struct Class));
|
tmp = rb_malloc(sizeof(struct Class));
|
||||||
|
|
||||||
ConFreq(tmp) = DEFAULT_CONNECTFREQUENCY;
|
ConFreq(tmp) = DEFAULT_CONNECTFREQUENCY;
|
||||||
PingFreq(tmp) = DEFAULT_PINGFREQUENCY;
|
PingFreq(tmp) = DEFAULT_PINGFREQUENCY;
|
||||||
MaxUsers(tmp) = 1;
|
MaxUsers(tmp) = 1;
|
||||||
MaxSendq(tmp) = DEFAULT_SENDQ;
|
MaxSendq(tmp) = DEFAULT_SENDQ;
|
||||||
|
|
||||||
tmp->ip_limits = rb_new_patricia(PATRICIA_BITS);
|
tmp->ip_limits = rb_new_patricia(PATRICIA_BITS);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
free_class(struct Class *tmp)
|
free_class(struct Class *tmp)
|
||||||
{
|
{
|
||||||
if(tmp->ip_limits)
|
if(tmp->ip_limits)
|
||||||
rb_destroy_patricia(tmp->ip_limits, NULL);
|
rb_destroy_patricia(tmp->ip_limits, NULL);
|
||||||
|
|
||||||
rb_free(tmp->class_name);
|
rb_free(tmp->class_name);
|
||||||
rb_free(tmp);
|
rb_free(tmp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue