Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2018-02-20 02:44:47 +0300
committerHolger Weiss <holger@zedat.fu-berlin.de>2018-02-20 02:44:47 +0300
commita875195940303324a466d30965783cc86a01d916 (patch)
treec1114323168a41ef49212868e70daaf278070411
parent06c480106f3a3806be7c300c0344e276812c520e (diff)
mod_admin_extra: Fix srg_get_info with '@all@'
Don't let the srg_get_info command crash if the roster group has '@all@' or the '@online@' users as members.
-rw-r--r--src/mod_admin_extra.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mod_admin_extra.erl b/src/mod_admin_extra.erl
index b5ed39540..1f3ec0397 100644
--- a/src/mod_admin_extra.erl
+++ b/src/mod_admin_extra.erl
@@ -1507,11 +1507,12 @@ srg_get_info(Group, Host) ->
Os when is_list(Os) -> Os;
error -> []
end,
- [{misc:atom_to_binary(Title), btl(Value)} || {Title, Value} <- Opts].
+ [{misc:atom_to_binary(Title), to_list(Value)} || {Title, Value} <- Opts].
-btl([]) -> [];
-btl([B|L]) -> [btl(B)|btl(L)];
-btl(B) -> binary_to_list(B).
+to_list([]) -> [];
+to_list([H|T]) -> [to_list(H)|to_list(T)];
+to_list(E) when is_atom(E) -> atom_to_list(E);
+to_list(E) -> binary_to_list(E).
srg_get_members(Group, Host) ->
Members = mod_shared_roster:get_group_explicit_users(Host,Group),