end;
Rs ->
Value = case
- ejabberd_config:get_local_option({domain_balancing,
- LDstDomain}, fun(D) when is_atom(D) -> D end)
+ ejabberd_config:get_option({domain_balancing,
+ LDstDomain}, fun(D) when is_atom(D) -> D end)
of
undefined -> p1_time_compat:monotonic_time();
random -> p1_time_compat:monotonic_time();
false -> ok
end.
-
+opt_type(domain_balancing) ->
+ fun (random) -> random;
+ (source) -> source;
+ (destination) -> destination;
+ (bare_source) -> bare_source;
+ (bare_destination) -> bare_destination
+ end;
opt_type(domain_balancing_component_number) ->
fun (N) when is_integer(N), N > 1 -> N end;
-opt_type(_) -> [domain_balancing_component_number].
+opt_type(_) -> [domain_balancing, domain_balancing_component_number].