aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
diff options
context:
space:
mode:
authorMagnus Henoch <[email protected]>2016-04-20 17:20:05 +0100
committerMagnus Henoch <[email protected]>2016-05-25 17:36:50 +0100
commit252c60632664fdf54395d54ad8d7b7e9e6e74cca (patch)
treea7e916f5812af7970ea8f9d1db548aa444039706 /lib/kernel/src
parent34f853950685e4e7ab38f30fc3f17a6beac13349 (diff)
downloadotp-252c60632664fdf54395d54ad8d7b7e9e6e74cca.tar.gz
otp-252c60632664fdf54395d54ad8d7b7e9e6e74cca.tar.bz2
otp-252c60632664fdf54395d54ad8d7b7e9e6e74cca.zip
Use the -epmd_module flag consistently
If the -epmd_module flag has been specified on the command line, use that module to register and look up node names instead of the default, erl_epmd. Also document this option.
Diffstat (limited to 'lib/kernel/src')
-rw-r--r--lib/kernel/src/inet_tcp_dist.erl6
-rw-r--r--lib/kernel/src/net_adm.erl3
2 files changed, 6 insertions, 3 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(),