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:
parent
5aead42964
commit
80fcd2eb56
@ -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.
|
||||
|
||||
|
20
src/jlib.erl
20
src/jlib.erl
@ -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}.
|
||||
|
Loading…
Reference in New Issue
Block a user