]> granicus.if.org Git - ejabberd/commitdiff
add missing format handler
authorChristophe Romain <christophe.romain@process-one.net>
Thu, 5 Jun 2014 14:18:17 +0000 (16:18 +0200)
committerChristophe Romain <christophe.romain@process-one.net>
Thu, 5 Jun 2014 14:23:17 +0000 (16:23 +0200)
src/ejabberd_xmlrpc.erl

index ff89d285880f7d1f1d21656e693bc7d5dc3b5c30..a289196a3442f0c92eb3f7765c2dd8540aceadcb 100644 (file)
@@ -450,6 +450,10 @@ format_result(String, {Name, string}) when is_list(String) ->
     {struct, [{Name, lists:flatten(String)}]};
 format_result(Binary, {Name, string}) when is_binary(Binary) ->
     {struct, [{Name, binary_to_list(Binary)}]};
+format_result(String, {Name, binary}) when is_list(String) ->
+    {struct, [{Name, lists:flatten(String)}]};
+format_result(Binary, {Name, binary}) when is_binary(Binary) ->
+    {struct, [{Name, binary_to_list(Binary)}]};
 format_result(Code, {Name, rescode}) ->
     {struct, [{Name, make_status(Code)}]};
 format_result({Code, Text}, {Name, restuple}) ->