mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Use DEBUG instead of INFO_MSG to keep log files small. Fix parse errors for grepping 'stream:error' (thanks to Stefan Strigler)
SVN Revision: 2226
This commit is contained in:
parent
4dac8f437f
commit
51a55723cf
@ -4,12 +4,12 @@
|
|||||||
%%% 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 349 2007-08-30 13:39:57Z sstrigler $
|
%%% Id : $Id: ejabberd_http_bind.erl 389 2007-09-25 15:27:44Z sstrigler $
|
||||||
%%%----------------------------------------------------------------------
|
%%%----------------------------------------------------------------------
|
||||||
|
|
||||||
-module(ejabberd_http_bind).
|
-module(ejabberd_http_bind).
|
||||||
-author('steve@zeank.in-berlin.de').
|
-author('steve@zeank.in-berlin.de').
|
||||||
-vsn('$Rev: 349 $').
|
-vsn('$Rev: 389 $').
|
||||||
|
|
||||||
-behaviour(gen_fsm).
|
-behaviour(gen_fsm).
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ process_request(Data) ->
|
|||||||
%% {stop, StopReason}
|
%% {stop, StopReason}
|
||||||
%%----------------------------------------------------------------------
|
%%----------------------------------------------------------------------
|
||||||
init([Sid, Key]) ->
|
init([Sid, Key]) ->
|
||||||
?INFO_MSG("started: ~p", [{Sid, Key}]),
|
?DEBUG("started: ~p", [{Sid, Key}]),
|
||||||
Opts = [], % TODO
|
Opts = [], % TODO
|
||||||
ejabberd_socket:start(ejabberd_c2s, ?MODULE, {http_bind, self()}, Opts),
|
ejabberd_socket:start(ejabberd_c2s, ?MODULE, {http_bind, self()}, Opts),
|
||||||
% {ok, C2SPid} = ejabberd_c2s:start({?MODULE, {http_bind, self()}}, Opts),
|
% {ok, C2SPid} = ejabberd_c2s:start({?MODULE, {http_bind, self()}}, Opts),
|
||||||
@ -793,14 +793,12 @@ send_outpacket(#http_bind{pid = FsmRef}, OutPacket) ->
|
|||||||
case xml_stream:parse_element(
|
case xml_stream:parse_element(
|
||||||
"<stream:stream>"++OutPacket) of
|
"<stream:stream>"++OutPacket) of
|
||||||
El when element(1, El) == xmlelement ->
|
El when element(1, El) == xmlelement ->
|
||||||
{xmlelement, _Tag, _Attr, Els} = El,
|
case xml:get_subtag(El, "stream:error") of
|
||||||
[{xmlelement, SE, _, Cond} | _] = Els,
|
false ->
|
||||||
if
|
null;
|
||||||
SE == "stream:error" ->
|
{xmlelement, _, _, Cond} ->
|
||||||
Cond;
|
Cond
|
||||||
true ->
|
end;
|
||||||
null
|
|
||||||
end;
|
|
||||||
{error, _E} ->
|
{error, _E} ->
|
||||||
null
|
null
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user