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

Remove commented-out code and use proper variable names.

SVN Revision: 1545
This commit is contained in:
Jean-Sébastien Pédron 2008-08-26 13:00:35 +00:00
parent 5aead42964
commit 80fcd2eb56
2 changed files with 10 additions and 13 deletions

View File

@ -3,7 +3,8 @@
* src/jlib.erl: short_jid/1 and short_bare_jid/1 now produce a short
JID from the user-provided JID parts. To obtain a short JID from the
STRINGPREP'd parts, use the new short_prepd_jid/1 and
short_prepd_bare_jid/1 functions.
short_prepd_bare_jid/1 functions. Remove commented-out code and use
proper variable names.
* src/acl.erl: Use the new short_prepd_jid/1 function from jlib.

View File

@ -763,20 +763,16 @@ to_old_jid(#jid{user = Node, resource = Resource,
JID#jid{user = Node1, resource = Resource1,
luser = LNode1, lresource = LResource1}.
short_jid(JID1) ->
%JID1 = to_old_jid(JID),
{JID1#jid.user, JID1#jid.server, JID1#jid.resource}.
short_jid(JID) ->
{JID#jid.user, JID#jid.server, JID#jid.resource}.
short_bare_jid(JID) ->
%JID1 = to_old_jid(exmpp_jid:jid_to_bare_jid(JID)),
JID1 = exmpp_jid:jid_to_bare_jid(JID),
{JID1#jid.user, JID1#jid.server, JID1#jid.resource}.
Bare_JID = exmpp_jid:jid_to_bare_jid(JID),
{Bare_JID#jid.user, Bare_JID#jid.server, Bare_JID#jid.resource}.
short_prepd_jid(JID1) ->
%JID1 = to_old_jid(JID),
{JID1#jid.luser, JID1#jid.lserver, JID1#jid.lresource}.
short_prepd_jid(JID) ->
{JID#jid.luser, JID#jid.lserver, JID#jid.lresource}.
short_prepd_bare_jid(JID) ->
%JID1 = to_old_jid(exmpp_jid:jid_to_bare_jid(JID)),
JID1 = exmpp_jid:jid_to_bare_jid(JID),
{JID1#jid.luser, JID1#jid.lserver, JID1#jid.lresource}.
Bare_JID = exmpp_jid:jid_to_bare_jid(JID),
{Bare_JID#jid.luser, Bare_JID#jid.lserver, Bare_JID#jid.lresource}.