diff options
author | Badlop <badlop@process-one.net> | 2013-06-14 16:08:47 +0200 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2013-06-14 16:08:47 +0200 |
commit | 4c445b37fd6df100a6408e5c9095b5abd718d01a (patch) | |
tree | ac8abaf2cded08ae8f81195e4ec07ad598aadae4 /src | |
parent | Make ejabberd_ctl not die for ejabberd_commands with binary arguments (diff) |
In frontends, if result is in binary then convert to string
Diffstat (limited to 'src')
-rw-r--r-- | src/ejabberd_ctl.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ejabberd_ctl.erl b/src/ejabberd_ctl.erl index d990576c1..78d8b0624 100644 --- a/src/ejabberd_ctl.erl +++ b/src/ejabberd_ctl.erl @@ -359,9 +359,12 @@ format_result(Atom, {_Name, atom}) -> format_result(Int, {_Name, integer}) -> io_lib:format("~p", [Int]); -format_result(String, {_Name, string}) -> +format_result(String, {_Name, string}) when is_list(String) -> io_lib:format("~s", [String]); +format_result(Binary, {_Name, string}) when is_binary(Binary) -> + io_lib:format("~s", [binary_to_list(Binary)]); + format_result(Code, {_Name, rescode}) -> make_status(Code); |