25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

In frontends, if result is in binary then convert to string

This commit is contained in:
Badlop 2013-06-14 16:08:47 +02:00
parent f6e39f64e2
commit 4c445b37fd

View File

@ -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);