aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-05-27 08:53:33 +0200
committerLukas Larsson <[email protected]>2016-05-27 08:53:33 +0200
commitea8064b1bbda0ef59420ec8a805f3ee52630d704 (patch)
treefd8351867db2f6038002d13970ff385838e1bf73 /lib
parente5f436615f0649a4d19b03762c016e91e0dce0eb (diff)
parent8ff06daa90c7c3c599c9e8cbc93fe98c2ed5ebfa (diff)
downloadotp-ea8064b1bbda0ef59420ec8a805f3ee52630d704.tar.gz
otp-ea8064b1bbda0ef59420ec8a805f3ee52630d704.tar.bz2
otp-ea8064b1bbda0ef59420ec8a805f3ee52630d704.zip
Merge branch 'legoscia/erts/epmd-module-option/OTP-13627'
* legoscia/erts/epmd-module-option/OTP-13627: Add tests for -start_epmd and -epmd_module options Use the -epmd_module flag consistently Add -start_epmd command line option
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/src/inet_tcp_dist.erl6
-rw-r--r--lib/kernel/src/net_adm.erl3
-rw-r--r--lib/ssl/src/inet_tls_dist.erl3
-rw-r--r--lib/ssl/src/ssl_tls_dist_proxy.erl3
4 files changed, 10 insertions, 5 deletions
diff --git a/lib/kernel/src/inet_tcp_dist.erl b/lib/kernel/src/inet_tcp_dist.erl
index 64b28bb49b..f91d7ef7c3 100644
--- a/lib/kernel/src/inet_tcp_dist.erl
+++ b/lib/kernel/src/inet_tcp_dist.erl
@@ -73,7 +73,8 @@ gen_listen(Driver, Name) ->
{ok, Socket} ->
TcpAddress = get_tcp_address(Driver, Socket),
{_,Port} = TcpAddress#net_address.address,
- case erl_epmd:register_node(Name, Port) of
+ ErlEpmd = net_kernel:epmd_module(),
+ case ErlEpmd:register_node(Name, Port) of
{ok, Creation} ->
{ok, {Socket, TcpAddress, Creation}};
Error ->
@@ -280,7 +281,8 @@ do_setup(Driver, Kernel, Node, Type, MyNode, LongOrShortNames, SetupTime) ->
case inet:getaddr(Address, AddressFamily) of
{ok, Ip} ->
Timer = dist_util:start_timer(SetupTime),
- case erl_epmd:port_please(Name, Ip) of
+ ErlEpmd = net_kernel:epmd_module(),
+ case ErlEpmd:port_please(Name, Ip) of
{port, TcpPort, Version} ->
?trace("port_please(~p) -> version ~p~n",
[Node,Version]),
diff --git a/lib/kernel/src/net_adm.erl b/lib/kernel/src/net_adm.erl
index a38356c224..8ec275b88b 100644
--- a/lib/kernel/src/net_adm.erl
+++ b/lib/kernel/src/net_adm.erl
@@ -96,7 +96,8 @@ names() ->
Reason :: address | file:posix().
names(Hostname) ->
- erl_epmd:names(Hostname).
+ ErlEpmd = net_kernel:epmd_module(),
+ ErlEpmd:names(Hostname).
-spec dns_hostname(Host) -> {ok, Name} | {error, Host} when
Host :: atom() | string(),
diff --git a/lib/ssl/src/inet_tls_dist.erl b/lib/ssl/src/inet_tls_dist.erl
index 3481e89af0..0da4b3587f 100644
--- a/lib/ssl/src/inet_tls_dist.erl
+++ b/lib/ssl/src/inet_tls_dist.erl
@@ -87,7 +87,8 @@ do_setup(Driver, Kernel, Node, Type, MyNode, LongOrShortNames, SetupTime) ->
case inet:getaddr(Address, Driver:family()) of
{ok, Ip} ->
Timer = dist_util:start_timer(SetupTime),
- case erl_epmd:port_please(Name, Ip) of
+ ErlEpmd = net_kernel:epmd_module(),
+ case ErlEpmd:port_please(Name, Ip) of
{port, TcpPort, Version} ->
?trace("port_please(~p) -> version ~p~n",
[Node,Version]),
diff --git a/lib/ssl/src/ssl_tls_dist_proxy.erl b/lib/ssl/src/ssl_tls_dist_proxy.erl
index 4651687fe6..2e308a15b7 100644
--- a/lib/ssl/src/ssl_tls_dist_proxy.erl
+++ b/lib/ssl/src/ssl_tls_dist_proxy.erl
@@ -116,7 +116,8 @@ handle_call({listen, Driver, Name}, _From, State) ->
{ok, TcpAddress} = get_tcp_address(Socket),
{ok, WorldTcpAddress} = get_tcp_address(World),
{_,Port} = WorldTcpAddress#net_address.address,
- case erl_epmd:register_node(Name, Port) of
+ ErlEpmd = net_kernel:epmd_module(),
+ case ErlEpmd:register_node(Name, Port) of
{ok, Creation} ->
{reply, {ok, {Socket, TcpAddress, Creation}},
State#state{listen={Socket, World}}};