mod_spam_filter: Register 'reopen_log_hook'
Don't forget to register the 'reopen_log_hook' for reopening the spam dump file. Thanks to Nico Wellpott for reporting this issue.
This commit is contained in:
parent
34bf1a7d6c
commit
689f526cea
|
@ -154,6 +154,8 @@ init([Host, Opts]) ->
|
|||
s2s_in_handle_info, 90),
|
||||
ejabberd_hooks:add(s2s_receive_packet, Host, ?MODULE,
|
||||
s2s_receive_packet, 50),
|
||||
ejabberd_hooks:add(reopen_log_hook, ?MODULE,
|
||||
reopen_log, 50),
|
||||
DumpFd = if DumpFile == none ->
|
||||
undefined;
|
||||
true ->
|
||||
|
@ -263,6 +265,8 @@ handle_info(Info, State) ->
|
|||
terminate(Reason, #state{host = Host} = State) ->
|
||||
?DEBUG("Stopping spam filter process for ~s: ~p", [Host, Reason]),
|
||||
close_dump_file(State),
|
||||
ejabberd_hooks:delete(reopen_log_hook, ?MODULE,
|
||||
reopen_log, 50),
|
||||
ejabberd_hooks:delete(s2s_receive_packet, Host, ?MODULE,
|
||||
s2s_receive_packet, 50),
|
||||
ejabberd_hooks:delete(s2s_in_handle_info, Host, ?MODULE,
|
||||
|
|
Loading…
Reference in New Issue