25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-31 15:21:38 +01:00

Add support for binary arguments and results to ejabberd_xmlrpc

This commit is contained in:
Badlop 2012-11-20 13:56:09 +01:00
parent 77111aeec1
commit dfa47556d1

View File

@ -408,6 +408,8 @@ format_result(Int, {Name, integer}) ->
{struct, [{Name, Int}]}; {struct, [{Name, Int}]};
format_result(String, {Name, string}) -> format_result(String, {Name, string}) ->
{struct, [{Name, lists:flatten(String)}]}; {struct, [{Name, lists:flatten(String)}]};
format_result(Binary, {Name, binary}) ->
{struct, [{Name, binary_to_list(Binary)}]};
format_result(Code, {Name, rescode}) -> format_result(Code, {Name, rescode}) ->
{struct, [{Name, make_status(Code)}]}; {struct, [{Name, make_status(Code)}]};
format_result({Code, Text}, {Name, restuple}) -> format_result({Code, Text}, {Name, restuple}) ->