diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2018-07-05 09:31:55 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2018-07-05 09:31:55 +0300 |
commit | 50b645aa92cd356df2c42ac6a903304c49df1e53 (patch) | |
tree | 60667eb66cb822af799a09bc6a0848d3f3b8dca6 /src/mod_proxy65_stream.erl | |
parent | Set 'from' attribute for client connections when it is absent (diff) |
Move shaper to p1_utils repo
Diffstat (limited to '')
-rw-r--r-- | src/mod_proxy65_stream.erl | 8 |
1 files changed, 4 insertions, 4 deletions
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]) |