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

Fix remote-stream-error stanzas

SVN Revision: 2311
This commit is contained in:
Badlop 2009-06-16 18:27:05 +00:00
parent eeb11046d5
commit c74ef80f79

View File

@ -4,7 +4,7 @@
%%% Purpose : Implements XMPP over BOSH (XEP-0205) (formerly known as %%% Purpose : Implements XMPP over BOSH (XEP-0205) (formerly known as
%%% HTTP Binding) %%% HTTP Binding)
%%% Created : 21 Sep 2005 by Stefan Strigler <steve@zeank.in-berlin.de> %%% Created : 21 Sep 2005 by Stefan Strigler <steve@zeank.in-berlin.de>
%%% Id : $Id: ejabberd_http_bind.erl 885 2009-02-14 09:01:54Z badlop $ %%% Id : $Id: ejabberd_http_bind.erl 917 2009-03-13 16:27:30Z badlop $
%%%---------------------------------------------------------------------- %%%----------------------------------------------------------------------
-module(ejabberd_http_bind). -module(ejabberd_http_bind).
@ -976,8 +976,8 @@ send_outpacket(#http_bind{pid = FsmRef}, OutPacket) ->
case xml:get_subtag(El, "stream:error") of case xml:get_subtag(El, "stream:error") of
false -> false ->
null; null;
{xmlelement, _, _, Cond} -> {xmlelement, _, _, _Cond} = StreamErrorTag ->
Cond [StreamErrorTag]
end; end;
{error, _E} -> {error, _E} ->
null null
@ -994,7 +994,8 @@ send_outpacket(#http_bind{pid = FsmRef}, OutPacket) ->
{200, ?HEADER, {200, ?HEADER,
"<body type='terminate' " "<body type='terminate' "
"condition='remote-stream-error' " "condition='remote-stream-error' "
"xmlns='"++?NS_HTTP_BIND++"'>" ++ "xmlns='"++?NS_HTTP_BIND++"' " ++
"xmlns:stream='"++?NS_STREAM++"'>" ++
elements_to_string(StreamErrCond) ++ elements_to_string(StreamErrCond) ++
"</body>"} "</body>"}
end; end;