mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Removed debugging stuff. Removed error condition (thanks to Stefan Strigler)
SVN Revision: 2284
This commit is contained in:
parent
7cb0b1a911
commit
bf4e927142
@ -3,12 +3,12 @@
|
||||
%%% Author : Stefan Strigler <steve@zeank.in-berlin.de>
|
||||
%%% Purpose : HTTP Binding support (JEP-0124)
|
||||
%%% Created : 21 Sep 2005 by Stefan Strigler <steve@zeank.in-berlin.de>
|
||||
%%% Id : $Id: ejabberd_http_bind.erl 276 2007-08-15 16:09:23Z sstrigler $
|
||||
%%% Id : $Id: ejabberd_http_bind.erl 277 2007-08-16 09:39:05Z sstrigler $
|
||||
%%%----------------------------------------------------------------------
|
||||
|
||||
-module(ejabberd_http_bind).
|
||||
-author('steve@zeank.in-berlin.de').
|
||||
-vsn('$Rev: 276 $').
|
||||
-vsn('$Rev: 277 $').
|
||||
|
||||
-behaviour(gen_fsm).
|
||||
|
||||
@ -160,7 +160,7 @@ process_request(Data) ->
|
||||
V -> V
|
||||
end,
|
||||
XmppVersion = xml:get_attr_s("xmpp:version", Attrs),
|
||||
case catch mnesia:transaction(
|
||||
mnesia:transaction(
|
||||
fun() ->
|
||||
mnesia:write(
|
||||
#http_bind{id = Sid,
|
||||
@ -171,12 +171,7 @@ process_request(Data) ->
|
||||
wait = Wait,
|
||||
version = Version
|
||||
})
|
||||
end) of
|
||||
{'EXIT', Reason} ->
|
||||
?DEBUG("failed storing session: ~p", [Reason]);
|
||||
Foo ->
|
||||
?DEBUG("foo: ~p", [Foo])
|
||||
end,
|
||||
end),
|
||||
handle_http_put(Sid, Rid, Attrs, Payload, true)
|
||||
end;
|
||||
{ok, {Sid, Rid, Attrs, Payload1}} ->
|
||||
@ -609,14 +604,6 @@ receive_loop(Sess, Rid, Attrs, StreamStart) ->
|
||||
prepare_response(#http_bind{id=Sid, wait=Wait, hold=Hold}=Sess,
|
||||
Rid, Attrs, StreamStart) ->
|
||||
case http_get(Sess, Rid) of
|
||||
{error, not_exists} ->
|
||||
case xml:get_attr_s("type", Attrs) of
|
||||
"terminate" ->
|
||||
{200, ?HEADER, "<body xmlns='"++?NS_HTTP_BIND++"'/>"};
|
||||
_ ->
|
||||
?DEBUG("no session associated with sid: ~s", [Sid]),
|
||||
{404, ?HEADER, ""}
|
||||
end;
|
||||
{ok, keep_on_hold} ->
|
||||
receive_loop(Sess, Rid, Attrs, StreamStart);
|
||||
{ok, cancel} ->
|
||||
|
Loading…
Reference in New Issue
Block a user