diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2013-08-12 22:25:05 +1000 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2013-08-21 22:17:59 +1000 |
commit | 91a74e3e27cf2c2f6b25888c3cc276d0ddbf5c69 (patch) | |
tree | a3838e249275ca587018d865fade3f3c41e9eddb /src/mod_proxy65_stream.erl | |
parent | Do not try to read/write the deprecated "config" table (diff) |
Change configuration file format to YAML
Diffstat (limited to '')
-rw-r--r-- | src/mod_proxy65_stream.erl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mod_proxy65_stream.erl b/src/mod_proxy65_stream.erl index 9b861f4db..b37dcc13a 100644 --- a/src/mod_proxy65_stream.erl +++ b/src/mod_proxy65_stream.erl @@ -279,10 +279,14 @@ select_auth_method(anonymous, AuthMethods) -> %% Obviously, we must use shaper with maximum rate. find_maxrate(Shaper, JID1, JID2, Host) -> - MaxRate1 = shaper:new(acl:match_rule(Host, Shaper, - JID1)), - MaxRate2 = shaper:new(acl:match_rule(Host, Shaper, - JID2)), + MaxRate1 = case acl:match_rule(Host, Shaper, JID1) of + deny -> none; + R1 -> shaper:new(R1) + end, + MaxRate2 = case acl:match_rule(Host, Shaper, JID2) of + deny -> none; + R2 -> shaper:new(R2) + end, if MaxRate1 == none; MaxRate2 == none -> none; true -> lists:max([MaxRate1, MaxRate2]) end. |