mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-12 21:52:07 +02:00
Reorganize get_opt() code in some modules
This commit is contained in:
parent
48213b09ce
commit
ea7de2097f
|
@ -490,15 +490,18 @@ need_ob_hdrs(Contacts, _IsOutboundSupported = true) ->
|
||||||
end, Contacts).
|
end, Contacts).
|
||||||
|
|
||||||
get_flow_timeout(LServer, #sip_socket{type = Type}) ->
|
get_flow_timeout(LServer, #sip_socket{type = Type}) ->
|
||||||
{Option, Default} =
|
case Type of
|
||||||
case Type of
|
udp ->
|
||||||
udp -> {flow_timeout_udp, ?FLOW_TIMEOUT_UDP};
|
gen_mod:get_module_opt(
|
||||||
_ -> {flow_timeout_tcp, ?FLOW_TIMEOUT_TCP}
|
LServer, mod_sip, flow_timeout_udp,
|
||||||
end,
|
fun(I) when is_integer(I), I>0 -> I end,
|
||||||
gen_mod:get_module_opt(
|
?FLOW_TIMEOUT_UDP);
|
||||||
LServer, mod_sip, Option,
|
_ ->
|
||||||
fun(I) when is_integer(I), I>0 -> I end,
|
gen_mod:get_module_opt(
|
||||||
Default).
|
LServer, mod_sip, flow_timeout_tcp,
|
||||||
|
fun(I) when is_integer(I), I>0 -> I end,
|
||||||
|
?FLOW_TIMEOUT_TCP)
|
||||||
|
end.
|
||||||
|
|
||||||
update_table() ->
|
update_table() ->
|
||||||
Fields = record_info(fields, sip_session),
|
Fields = record_info(fields, sip_session),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user