mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
* src/mod_configure2.erl: Added reporting of outgoing S2S
connections number * src/mod_disco.erl (get_outgoing_s2s): Minor fix SVN Revision: 169
This commit is contained in:
parent
4e73731589
commit
1d9340619f
@ -1,3 +1,10 @@
|
||||
2003-11-06 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/mod_configure2.erl: Added reporting of outgoing S2S
|
||||
connections number
|
||||
|
||||
* src/mod_disco.erl (get_outgoing_s2s): Minor fix
|
||||
|
||||
2003-11-02 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/mod_configure2.erl: Yet another configure interface (not
|
||||
|
@ -85,6 +85,8 @@ process_local_iq(From, _To, {iq, ID, Type, XMLNS, SubEl}) ->
|
||||
|
||||
|
||||
process_get({xmlelement, "info", _Attrs, _SubEls}) ->
|
||||
S2SConns = ejabberd_s2s:dirty_get_connections(),
|
||||
TConns = lists:usort([element(2, C) || C <- S2SConns]),
|
||||
Attrs = [{"registered-users",
|
||||
integer_to_list(mnesia:table_info(passwd, size))},
|
||||
{"online-users",
|
||||
@ -95,7 +97,8 @@ process_get({xmlelement, "info", _Attrs, _SubEls}) ->
|
||||
integer_to_list(
|
||||
length(lists:usort(mnesia:system_info(db_nodes) ++
|
||||
mnesia:system_info(extra_db_nodes)) --
|
||||
mnesia:system_info(running_db_nodes)))}],
|
||||
mnesia:system_info(running_db_nodes)))},
|
||||
{"outgoing-s2s-servers", integer_to_list(length(TConns))}],
|
||||
{result, {xmlelement, "info",
|
||||
[{"xmlns", ?NS_ECONFIGURE} | Attrs], []}};
|
||||
process_get({xmlelement, "welcome-message", Attrs, _SubEls}) ->
|
||||
|
@ -379,8 +379,9 @@ get_outgoing_s2s(Lang) ->
|
||||
{'EXIT', Reason} ->
|
||||
[];
|
||||
Connections ->
|
||||
TConns = [element(2, C) || C <- Connections],
|
||||
lists:map(
|
||||
fun({F, T}) ->
|
||||
fun(T) ->
|
||||
{xmlelement, "item",
|
||||
[{"jid", ?MYNAME},
|
||||
{"node", "outgoing s2s/" ++ T},
|
||||
@ -389,7 +390,7 @@ get_outgoing_s2s(Lang) ->
|
||||
io_lib:format(
|
||||
translate:translate(Lang, "To ~s"), [T]))}],
|
||||
[]}
|
||||
end, lists:keysort(2, Connections))
|
||||
end, lists:usort(TConns))
|
||||
end.
|
||||
|
||||
get_outgoing_s2s(Lang, To) ->
|
||||
|
Loading…
Reference in New Issue
Block a user