mirror of
https://github.com/processone/ejabberd.git
synced 2024-09-27 14:30:55 +02:00
* src/ejabberd_s2s_out.erl: Bugfix
SVN Revision: 976
This commit is contained in:
parent
65a7bb7d2a
commit
950060cd3c
@ -1,5 +1,7 @@
|
|||||||
2007-11-25 Alexey Shchepin <alexey@process-one.net>
|
2007-11-25 Alexey Shchepin <alexey@process-one.net>
|
||||||
|
|
||||||
|
* src/ejabberd_s2s_out.erl: Bugfix
|
||||||
|
|
||||||
* src/ejabberd_sm.erl: Optimized check_max_sessions (thanks to
|
* src/ejabberd_sm.erl: Optimized check_max_sessions (thanks to
|
||||||
Christophe Romain)
|
Christophe Romain)
|
||||||
|
|
||||||
|
@ -789,10 +789,16 @@ send_queue(StateData, Q) ->
|
|||||||
|
|
||||||
%% Bounce a single message (xmlelement)
|
%% Bounce a single message (xmlelement)
|
||||||
bounce_element(El, Error) ->
|
bounce_element(El, Error) ->
|
||||||
|
{xmlelement, _Name, Attrs, _SubTags} = El,
|
||||||
|
case xml:get_attr_s("type", Attrs) of
|
||||||
|
"error" -> ok;
|
||||||
|
"result" -> ok;
|
||||||
|
_ ->
|
||||||
Err = jlib:make_error_reply(El, Error),
|
Err = jlib:make_error_reply(El, Error),
|
||||||
From = jlib:string_to_jid(xml:get_tag_attr_s("from", El)),
|
From = jlib:string_to_jid(xml:get_tag_attr_s("from", El)),
|
||||||
To = jlib:string_to_jid(xml:get_tag_attr_s("to", El)),
|
To = jlib:string_to_jid(xml:get_tag_attr_s("to", El)),
|
||||||
ejabberd_router:route(To, From, Err).
|
ejabberd_router:route(To, From, Err)
|
||||||
|
end.
|
||||||
|
|
||||||
bounce_queue(Q, Error) ->
|
bounce_queue(Q, Error) ->
|
||||||
case queue:out(Q) of
|
case queue:out(Q) of
|
||||||
@ -818,13 +824,7 @@ cancel_timer(Timer) ->
|
|||||||
bounce_messages(Error) ->
|
bounce_messages(Error) ->
|
||||||
receive
|
receive
|
||||||
{send_element, El} ->
|
{send_element, El} ->
|
||||||
{xmlelement, _Name, Attrs, _SubTags} = El,
|
bounce_element(El, Error),
|
||||||
case xml:get_attr_s("type", Attrs) of
|
|
||||||
"error" ->
|
|
||||||
ok;
|
|
||||||
_ ->
|
|
||||||
bounce_element(El, Error)
|
|
||||||
end,
|
|
||||||
bounce_messages(Error)
|
bounce_messages(Error)
|
||||||
after 0 ->
|
after 0 ->
|
||||||
ok
|
ok
|
||||||
|
Loading…
Reference in New Issue
Block a user