From 50b645aa92cd356df2c42ac6a903304c49df1e53 Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Thu, 5 Jul 2018 09:31:55 +0300 Subject: Move shaper to p1_utils repo --- src/mod_proxy65_stream.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mod_proxy65_stream.erl') diff --git a/src/mod_proxy65_stream.erl b/src/mod_proxy65_stream.erl index 418e4588f..0646e28c8 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]) -- cgit v1.2.3