25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Rename stop_all_connections to stop_s2s_connections for consistency

This commit is contained in:
Christophe Romain 2017-08-07 15:06:07 +02:00
parent 25af3fb029
commit 8679cfd2f3

View File

@ -39,7 +39,7 @@
remove_connection/2, start_connection/2, start_connection/3, remove_connection/2, start_connection/2, start_connection/3,
dirty_get_connections/0, allow_host/2, dirty_get_connections/0, allow_host/2,
incoming_s2s_number/0, outgoing_s2s_number/0, incoming_s2s_number/0, outgoing_s2s_number/0,
stop_all_connections/0, stop_s2s_connections/0,
clean_temporarily_blocked_table/0, clean_temporarily_blocked_table/0,
list_temporarily_blocked_hosts/0, list_temporarily_blocked_hosts/0,
external_host_overloaded/1, is_temporarly_blocked/1, external_host_overloaded/1, is_temporarly_blocked/1,
@ -558,10 +558,10 @@ get_commands_spec() ->
module = ?MODULE, function = outgoing_s2s_number, module = ?MODULE, function = outgoing_s2s_number,
args = [], result = {s2s_outgoing, integer}}, args = [], result = {s2s_outgoing, integer}},
#ejabberd_commands{ #ejabberd_commands{
name = stop_all_connections, tags = [s2s], name = stop_s2s_connections, tags = [s2s],
desc = "Stop all outgoing and incoming connections", desc = "Stop all s2s outgoing and incoming connections",
policy = admin, policy = admin,
module = ?MODULE, function = stop_all_connections, module = ?MODULE, function = stop_s2s_connections,
args = [], result = {res, rescode}}]. args = [], result = {res, rescode}}].
%% TODO Move those stats commands to ejabberd stats command ? %% TODO Move those stats commands to ejabberd stats command ?
@ -578,8 +578,8 @@ supervisor_count(Supervisor) ->
length(Result) length(Result)
end. end.
-spec stop_all_connections() -> ok. -spec stop_s2s_connections() -> ok.
stop_all_connections() -> stop_s2s_connections() ->
lists:foreach( lists:foreach(
fun({_Id, Pid, _Type, _Module}) -> fun({_Id, Pid, _Type, _Module}) ->
supervisor:terminate_child(ejabberd_s2s_in_sup, Pid) supervisor:terminate_child(ejabberd_s2s_in_sup, Pid)