ejabberd_xmlrpc + mod_admin_extra (user_sessions_info)

Hi,

I have an error when I execute the user_sessions_info command with xmlrpc module (last svn), when the user is connected :

15> xmlrpc:call({127, 0, 0, 1}, 4560, "/", {call, user_sessions_info, [{struct, [{user, "vincent"},{host, "192.168.67.123"}]}]}).          
{error,"HTTP/1.1 500 Internal Server Error\r\n"}

in ejabberd.log :

=INFO REPORT==== 2010-07-19 17:52:47 ===
D(<0.405.0>:ejabberd_commands:314) : Executing command mod_admin_extra:user_sessions_info with Args=["vincent",
                                                                                                     "192.168.67.123"]

=ERROR REPORT==== 2010-07-19 17:52:47 ===
{xmlrpc_http,153,
    {ejabberd_xmlrpc,handler,
        {'EXIT',
            {function_clause,
                [{lists,flatten,[c2s_tls]},
                 {ejabberd_xmlrpc,format_result,2},
                 {lists,map,2},
                 {ejabberd_xmlrpc,format_result,2},
                 {lists,map,2},
                 {ejabberd_xmlrpc,format_result,2},
                 {ejabberd_xmlrpc,do_command,6},
                 {ejabberd_xmlrpc,try_do_command,6}]}}}}

But with ejabberdctl, it works :

$ ./ejabberdctl user_sessions_info vincent 192.168.67.123
c2s_tls 192.168.67.123 57714 1 ejabberd@localhost 96 available Home

And if the user isn't connected, it "works" too :

16> xmlrpc:call({127, 0, 0, 1}, 4560, "/", {call, user_sessions_info, [{struct, [{user, "claude"},{host, "192.168.67.123"}]}]}).
{ok,{response,[{struct,[{sessions_info,{array,[]}}]}]}}

Thanks in advance.

It was a bug in

It was a bug in mod_admin_extra.erl. I've now fixed it in SVN, try it.

It works fine. Thank you

It works fine.
Thank you

Syndicate content