25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

Fix accesses to the new #jid opaque type.

PR:		EJABP-1

SVN Revision: 1825
This commit is contained in:
Jean-Sébastien Pédron 2009-01-19 10:14:55 +00:00
parent 2cc2039ad8
commit 8a27b5446d
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2009-01-19 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
* src/ejabberd_auth_anonymous.erl: Fix accesses to the new #jid opaque
type.
2009-01-16 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
Merge from trunk (r1734 to r1752).

View File

@ -54,7 +54,6 @@
plain_password_required/0]).
-include("ejabberd.hrl").
-include("jlib.hrl").
-record(anonymous, {us, sid}).
%% Create the anonymous table if at least one virtual host has anonymous features enabled
@ -141,7 +140,9 @@ remove_connection(SID, LUser, LServer) ->
mnesia:transaction(F).
%% Register connection
register_connection(SID, #jid{luser = LUser, lserver = LServer}, Info) ->
register_connection(SID, JID, Info) ->
LUser = exmpp_jid:lnode(JID),
LServer = exmpp_jid:ldomain(JID),
case proplists:get_value(auth_module, Info) of
undefined ->
ok;
@ -155,7 +156,9 @@ register_connection(SID, #jid{luser = LUser, lserver = LServer}, Info) ->
end.
%% Remove an anonymous user from the anonymous users table
unregister_connection(SID, #jid{luser = LUser, lserver = LServer}, _) ->
unregister_connection(SID, JID, _) ->
LUser = exmpp_jid:lnode(JID),
LServer = exmpp_jid:ldomain(JID),
purge_hook(anonymous_user_exist(LUser, LServer),
LUser, LServer),
remove_connection(SID, LUser, LServer).