提交 197bbd8c authored 作者: Brian West's avatar Brian West

FS-10495: [Modules] firing custom event with no sub class will crash freeswitch…

FS-10495: [Modules] firing custom event with no sub class will crash freeswitch when mod_fail2ban is loaded #resolve
上级 84540ea8
......@@ -79,7 +79,7 @@ static int fail2ban_logger(const char *message, char *user, char *ip)
static void fail2ban_event_handler(switch_event_t *event)
{
if (event->event_id == SWITCH_EVENT_CUSTOM) {
if (event->event_id == SWITCH_EVENT_CUSTOM && event->subclass_name) {
if (strncmp(event->subclass_name, "sofia::register_attempt",23) == 0) {
fail2ban_logger("A registration was attempted", switch_event_get_header(event, "to-user"), switch_event_get_header(event, "network-ip"));
} else if (strncmp(event->subclass_name, "sofia::register_failure",23) == 0) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论