diff options
Diffstat (limited to 'src/mod_proxy65_sm.erl')
-rw-r--r-- | src/mod_proxy65_sm.erl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mod_proxy65_sm.erl b/src/mod_proxy65_sm.erl index 367f7f0bd..895dd7d57 100644 --- a/src/mod_proxy65_sm.erl +++ b/src/mod_proxy65_sm.erl @@ -33,9 +33,9 @@ -export([init/1, handle_info/2, handle_call/3, handle_cast/2, terminate/2, code_change/3]). -%% API. -export([start_link/2, register_stream/1, - unregister_stream/1, activate_stream/4]). + unregister_stream/1, activate_stream/4, + mod_opt_type/1]). -record(state, {max_connections = infinity :: non_neg_integer() | infinity}). @@ -171,3 +171,9 @@ activate_stream(SHA1, IJid, TJid, Host) {atomic, false} -> false; _ -> error end. + +mod_opt_type(max_connections) -> + fun (I) when is_integer(I), I > 0 -> I; + (infinity) -> infinity + end; +mod_opt_type(_) -> [max_connections]. |