25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Fix some calls to exmpp

SVN Revision: 2138
This commit is contained in:
Badlop 2009-06-01 21:04:16 +00:00
parent ff3fd02115
commit 332de67fe2
3 changed files with 4 additions and 4 deletions

View File

@ -333,7 +333,7 @@ wait_for_stream({xmlstreamstart, #xmlel{ns = NS} = Opening}, StateData) ->
send_element(StateData,
exmpp_xml:append_child(Header,
exmpp_stream:error('policy-violation',
"en", "Use of STARTTLS required"))),
{"en", "Use of STARTTLS required"}))),
{stop, normal, StateData};
true ->
send_element(StateData, Header),
@ -598,7 +598,7 @@ wait_for_feature_request({xmlstreamelement, #xmlel{ns = NS, name = Name} = El},
if
(SockMod == gen_tcp) and TLSRequired ->
send_element(StateData, exmpp_stream:error(
'policy-violation', "en", "Use of STARTTLS required")),
'policy-violation', {"en", "Use of STARTTLS required"})),
send_element(StateData, exmpp_stream:closing()),
{stop, normal, StateData};
true ->

View File

@ -2213,7 +2213,7 @@ process_admin_items_set(UJID, Items, Lang, StateData) ->
SD;
%% TODO: <<>> or 'undefined' ?
%% TODO: double case on the E var, because
%% exmpp_jid:lnode/1 can't be used in guards
%% exmpp_jid:prep_node/1 can't be used in guards
%% If the provided JID does not have username,
%% forget the affiliation completely
_ -> case E of

View File

@ -433,7 +433,7 @@ send_loop(State) ->
ServerHost -> %% local contacts
case ejabberd_sm:get_user_resources(U, S) of
[] -> %% offline
PeerJID = exmpp_jlib:make_jid(U, S, R),
PeerJID = exmpp_jid:make(U, S, R),
self() ! {presence, User, Server, [Resource], PeerJID};
_ -> %% online
% this is already handled by presence probe