Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
thepug committed Apr 28, 2010
2 parents bad7d6c + 20a60d8 commit 2a74035
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/web/ejabberd_http_pre_bind.erl
Expand Up @@ -29,23 +29,24 @@ handle_http_put(Sid, Rid, Attrs, Payload, PayloadSize, StreamStart, IP) ->
case ejabberd_http_bind:http_put(Sid, Rid, Attrs, Payload, PayloadSize, StreamStart, IP) of
{error, not_exists} ->
?DEBUG("no session associated with sid: ~p", [Sid]),
{404, ?HEADER, ""};
{error, not_exists};
{{error, Reason}, _Sess} ->
?DEBUG("Error on HTTP put. Reason: ~p", [Reason]),
%% ignore errors
{200, ?HEADER, "<body xmlns='"++?NS_HTTP_BIND++"'/>"};
{ok, []};
{{wait, Pause}, _Sess} ->
?DEBUG("Trafic Shaper: Delaying request ~p", [Rid]),
timer:sleep(Pause),
handle_http_put(Sid, Rid, Attrs, Payload, PayloadSize,
StreamStart, IP);
{buffered, _Sess} ->
?DEBUG("buffered", []),
{200, ?HEADER, "<body xmlns='"++?NS_HTTP_BIND++"'/>"};
{ok, []};
{ok, Sess} ->
handle_response(Sess, Rid);
Out ->
?ERROR_MSG("Handle Put was invalid : ~p ~n", [Out])
?ERROR_MSG("Handle Put was invalid : ~p ~n", [Out]),
{error, undefined}
end.


Expand Down Expand Up @@ -87,7 +88,6 @@ handle_auth(Sid, Rid,
[]}}]} ->
Rid;
{ok, _Els} ->
error_logger:info_msg("Auth Success? ~p ~n", [_Els]),
timer:sleep(100),
handle_auth(Sid, Rid+1, Attrs, Payload,
PayloadSize, StreamStart, IP, Count+1);
Expand Down

0 comments on commit 2a74035

Please sign in to comment.