summaryrefslogtreecommitdiff
path: root/src/mod_proxy65_stream.erl
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2018-07-05 09:31:55 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2018-07-05 09:31:55 +0300
commit50b645aa92cd356df2c42ac6a903304c49df1e53 (patch)
tree60667eb66cb822af799a09bc6a0848d3f3b8dca6 /src/mod_proxy65_stream.erl
parentSet 'from' attribute for client connections when it is absent (diff)
Move shaper to p1_utils repo
Diffstat (limited to 'src/mod_proxy65_stream.erl')
-rw-r--r--src/mod_proxy65_stream.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mod_proxy65_stream.erl b/src/mod_proxy65_stream.erl
index 418e4588..0646e28c 100644
--- a/src/mod_proxy65_stream.erl
+++ b/src/mod_proxy65_stream.erl
@@ -53,7 +53,7 @@
sha1 = <<"">> :: binary(),
host = <<"">> :: binary(),
auth_type = anonymous :: plain | anonymous,
- shaper = none :: shaper:shaper()}).
+ shaper = none :: ejabberd_shaper:shaper()}).
%% Unused callbacks
handle_event(_Event, StateName, StateData) ->
@@ -248,7 +248,7 @@ relay(MySocket, PeerSocket, Shaper) ->
{ok, Data} ->
case gen_tcp:send(PeerSocket, Data) of
ok ->
- {NewShaper, Pause} = shaper:update(Shaper, byte_size(Data)),
+ {NewShaper, Pause} = ejabberd_shaper:update(Shaper, byte_size(Data)),
if Pause > 0 -> timer:sleep(Pause);
true -> pass
end,
@@ -278,11 +278,11 @@ select_auth_method(anonymous, AuthMethods) ->
find_maxrate(Shaper, JID1, JID2, Host) ->
MaxRate1 = case acl:match_rule(Host, Shaper, JID1) of
deny -> none;
- R1 -> shaper:new(R1)
+ R1 -> ejabberd_shaper:new(R1)
end,
MaxRate2 = case acl:match_rule(Host, Shaper, JID2) of
deny -> none;
- R2 -> shaper:new(R2)
+ R2 -> ejabberd_shaper:new(R2)
end,
if MaxRate1 == none; MaxRate2 == none -> none;
true -> lists:max([MaxRate1, MaxRate2])