aboutsummaryrefslogtreecommitdiff
path: root/src/ejabberd_stun.erl
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2020-05-29 18:40:19 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2020-05-29 18:40:19 +0200
commit7a37483307e1f62c750ecde8a088edacbe03c51f (patch)
treee42a4de7fc0c2524b81a75f73d88200b4a5baa6d /src/ejabberd_stun.erl
parentModify ERL_LDFLAGS of deps when compiling on R23 on rebar2 (diff)
Rename 'turn_v4_ip' and 'turn_v6_ip' options
The 'turn_ipv4_address' and 'turn_ipv6_address' option names are probably more intuitive.
Diffstat (limited to 'src/ejabberd_stun.erl')
-rw-r--r--src/ejabberd_stun.erl24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/ejabberd_stun.erl b/src/ejabberd_stun.erl
index 6be3434e7..a9250a4a1 100644
--- a/src/ejabberd_stun.erl
+++ b/src/ejabberd_stun.erl
@@ -101,20 +101,20 @@ prepare_turn_opts(Opts, _UseTurn = false) ->
set_certfile(Opts);
prepare_turn_opts(Opts, _UseTurn = true) ->
NumberOfMyHosts = length(ejabberd_option:hosts()),
- TurnIP = case proplists:get_value(turn_v4_ip, Opts) of
+ TurnIP = case proplists:get_value(turn_ipv4_address, Opts) of
undefined ->
- MyIP = misc:get_my_v4_ip(),
+ MyIP = misc:get_my_ipv4_address(),
case MyIP of
{127, _, _, _} ->
- ?WARNING_MSG("Option 'turn_v4_ip' is undefined "
- "and the server's hostname doesn't "
- "resolve to a public IPv4 address, "
- "most likely the TURN relay won't be "
- "working properly", []);
+ ?WARNING_MSG("Option 'turn_ipv4_address' is "
+ "undefined and the server's hostname "
+ "doesn't resolve to a public IPv4 "
+ "address, most likely the TURN relay "
+ "won't be working properly", []);
_ ->
ok
end,
- [{turn_v4_ip, MyIP}];
+ [{turn_ipv4_address, MyIP}];
_ ->
[]
end,
@@ -161,9 +161,9 @@ listen_opt_type(use_turn) ->
econf:bool();
listen_opt_type(ip) ->
econf:ip();
-listen_opt_type(turn_v4_ip) ->
+listen_opt_type(turn_ipv4_address) ->
econf:ipv4();
-listen_opt_type(turn_v6_ip) ->
+listen_opt_type(turn_ipv6_address) ->
econf:ipv6();
listen_opt_type(auth_type) ->
econf:enum([anonymous, user]);
@@ -187,8 +187,8 @@ listen_opt_type(certfile) ->
listen_options() ->
[{shaper, none},
{use_turn, false},
- {turn_v4_ip, undefined},
- {turn_v6_ip, undefined},
+ {turn_ipv4_address, undefined},
+ {turn_ipv6_address, undefined},
{auth_type, user},
{auth_realm, undefined},
{tls, false},