ircd: parse: add asserts for improper use of mod_add_cmd/mod_del_cmd
This commit is contained in:
parent
e8de2bfaf0
commit
5c317f1313
1 changed files with 5 additions and 2 deletions
|
@ -295,8 +295,10 @@ mod_add_cmd(struct Message *msg)
|
||||||
if(msg == NULL)
|
if(msg == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (rb_dictionary_find(cmd_dict, msg->cmd) != NULL)
|
if (rb_dictionary_find(cmd_dict, msg->cmd) != NULL) {
|
||||||
|
s_assert(0);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
msg->count = 0;
|
msg->count = 0;
|
||||||
msg->rcount = 0;
|
msg->rcount = 0;
|
||||||
|
@ -318,7 +320,8 @@ mod_del_cmd(struct Message *msg)
|
||||||
if(msg == NULL)
|
if(msg == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
rb_dictionary_delete(cmd_dict, msg->cmd);
|
if (rb_dictionary_delete(cmd_dict, msg->cmd) == NULL)
|
||||||
|
s_assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* cancel_clients()
|
/* cancel_clients()
|
||||||
|
|
Loading…
Reference in a new issue