[ejabberd] mod_statsdx

Bryan Barnes Bryan.Barnes at verety.com
Sat May 13 00:11:13 MSD 2006


After applying the patch I no longer get an error when a user logs in.
When the file attempts to write I get this error:

=ERROR REPORT==== 2006-05-12 15:02:31 ===
Error in process <0.305.0> on node 'ejabberd at farjabber01' with exit
value:
{{badmatch,{aborted,{{badmatch,{{1147,463884,356558},<0.309.0>}},[{mod_s
tatsdx,'-get_authusers/1-fun-0-',2},{lists,foldl,3},{mnesia,do_foldl,8},
{mnesia,foldl,6},{mnesia_tm,apply_fun,3},{mnesia_tm,execute_transaction,
5},{mod_statsdx,get_authusers,...

It still writes most of the file, but dies at --- Users ---.

Bryan

-----Original Message-----
From: ejabberd-bounces at jabber.ru [mailto:ejabberd-bounces at jabber.ru] On
Behalf Of Badlop
Sent: Friday, May 12, 2006 2:16 PM
To: ejabberd at jabber.ru
Subject: Re: [ejabberd] mod_statsdx

2006/5/12, Bryan Barnes <Bryan.Barnes at verety.com>:
> It starts correctly, but this is the error I get after a user logs in:
> =ERROR REPORT==== 2006-05-12 12:40:09 ===
> E(<0.309.0>:ejabberd_hooks:172): {function_clause,
>                                      [{xml,get_tag_cdata,[false]},
>
{mod_statsdx,received_response,3},
>                                       {ejabberd_hooks,run1,3},

It is a bug on the module that appears when GAIM or any other Jabber
client doesn't answer all requested info to jabber:iq:version. You can
simply disable hooks, so client's versions are not gathered, or apply
this patch:

----------------
--- mod_statsdx.erl.ini 2006-05-12 21:10:21.000000000 +0200
+++ mod_statsdx.erl     2006-05-12 21:10:27.000000000 +0200
@@ -642,7 +642,10 @@

 get_tag_cdata_subtag(E, T) ->
        E2 = xml:get_subtag(E, T),
-       xml:get_tag_cdata(E2).
+       case E2 of
+               false -> "unknown";
+               _ -> xml:get_tag_cdata(E2)
+       end.

 list_elem(Type, id) ->
        {_, Ids} = lists:unzip(list_elem(Type, full)),
--------------------


I hope that patch fixes the bug completely. If not, tell me.
Maybe this error report is related and will not appear again:

> =ERROR REPORT==== 2006-05-12 12:42:34 ===
>
$dx,'-get_authusers/1-fun-0-',2},{lists,foldl,3},{mnesia,do_foldl,8},{mn
>
esia,foldl,6},{mnesia_tm,apply_fun,3},{mnesia_tm,execute_transaction,5},
> {mod_statsdx, get_authusers,...

If it does, please tell me and include new logs.

--
_______________________________________________
ejabberd mailing list
ejabberd at jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd


More information about the ejabberd mailing list