|
21 | 21 |
|
22 | 22 |
|
23 | 23 | -export([listen/2, accept/2, connect/3, get_tcp_address/1]).
|
24 |
| --export([init/1, start_link/0, handle_call/3, handle_cast/2, handle_info/2, |
| 24 | +-export([init/1, start_link/0, handle_call/3, handle_cast/2, handle_info/2, |
25 | 25 | terminate/2, code_change/3]).
|
26 | 26 |
|
27 | 27 | -include_lib("kernel/include/net_address.hrl").
|
28 | 28 |
|
29 | 29 | -include("epmdless.hrl").
|
30 | 30 |
|
31 |
| --record(state, |
| 31 | +-record(state, |
32 | 32 | {listen,
|
33 | 33 | accept_loop
|
34 | 34 | }).
|
@@ -146,8 +146,8 @@ handle_call({accept, _Driver, Listen}, {From, _}, State = #state{listen={_, Worl
|
146 | 146 | handle_call({connect, Driver, Ip, Port}, {From, _}, State) ->
|
147 | 147 | Me = self(),
|
148 | 148 | Pid = spawn_link(fun() -> setup_proxy(Driver, Ip, Port, Me) end),
|
149 |
| - receive |
150 |
| - {Pid, go_ahead, LPort} -> |
| 149 | + receive |
| 150 | + {Pid, go_ahead, LPort} -> |
151 | 151 | Res = {ok, Socket} = try_connect(LPort),
|
152 | 152 | case gen_tcp:controlling_process(Socket, From) of
|
153 | 153 | {error, badarg} = Error -> {reply, Error, State}; % From is dead anyway.
|
@@ -196,7 +196,7 @@ accept_loop(Proxy, erts = Type, Listen, Extra) ->
|
196 | 196 | case gen_tcp:accept(Listen) of
|
197 | 197 | {ok, Socket} ->
|
198 | 198 | Extra ! {accept,self(),Socket,inet,proxy},
|
199 |
| - receive |
| 199 | + receive |
200 | 200 | {_Kernel, controller, Pid} ->
|
201 | 201 | inet:setopts(Socket, [nodelay()]),
|
202 | 202 | ok = gen_tcp:controlling_process(Socket, Pid),
|
@@ -326,7 +326,7 @@ setup_connection(World, ErtsListen) ->
|
326 | 326 |
|
327 | 327 |
|
328 | 328 | loop_conn_setup(World, Erts) ->
|
329 |
| - receive |
| 329 | + receive |
330 | 330 | {ssl, World, Data = <<$a, _/binary>>} ->
|
331 | 331 | gen_tcp:send(Erts, Data),
|
332 | 332 | ssl:setopts(World, [{packet,?PPOST}, nodelay(), {active, once}]),
|
@@ -377,8 +377,8 @@ loop_conn(World, Erts) ->
|
377 | 377 |
|
378 | 378 |
|
379 | 379 | get_ssl_options(Type) ->
|
380 |
| - application:load(epmdless_dist), |
381 |
| - {ok, Config} = application:get_env(epmdless_dist, ssl_dist_opt), |
| 380 | + application:load(epmdless), |
| 381 | + {ok, Config} = application:get_env(epmdless, ssl_dist_opt), |
382 | 382 | proplists:get_value(Type, Config).
|
383 | 383 |
|
384 | 384 |
|
|
0 commit comments