aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/erl_boot_server.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2013-04-22 15:28:49 +0200
committerHans Bolinder <[email protected]>2013-05-06 12:14:12 +0200
commit21a7806986d58480367cff8d385a12f9659c7754 (patch)
treecba88bf517ff4f86b86bb0d649f5204bac4d9ade /lib/kernel/src/erl_boot_server.erl
parent0dc5a00011d1d24b68c9d43ff608415f84c50499 (diff)
downloadotp-21a7806986d58480367cff8d385a12f9659c7754.tar.gz
otp-21a7806986d58480367cff8d385a12f9659c7754.tar.bz2
otp-21a7806986d58480367cff8d385a12f9659c7754.zip
Fix unmatched_returns warnings in STDLIB and Kernel
Diffstat (limited to 'lib/kernel/src/erl_boot_server.erl')
-rw-r--r--lib/kernel/src/erl_boot_server.erl20
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/kernel/src/erl_boot_server.erl b/lib/kernel/src/erl_boot_server.erl
index 0d68d3e198..33f1b96f8d 100644
--- a/lib/kernel/src/erl_boot_server.erl
+++ b/lib/kernel/src/erl_boot_server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -191,7 +191,7 @@ init(Slaves) ->
{ok, UPort} = inet:port(U),
Ref = make_ref(),
Pid = proc_lib:spawn_link(?MODULE, boot_init, [Ref]),
- gen_tcp:controlling_process(L, Pid),
+ ok = gen_tcp:controlling_process(L, Pid),
Pid ! {Ref, L},
%% We trap exit inorder to restart boot_init and udp_port
process_flag(trap_exit, true),
@@ -233,9 +233,19 @@ handle_info({udp, U, IP, Port, Data}, S0) ->
%% erlang version as the boot server node
case {Valid,Data,Token} of
{true,Token,Token} ->
- gen_udp:send(U,IP,Port,[?EBOOT_REPLY,S0#state.priority,
- int16(S0#state.listen_port),
- S0#state.version]),
+ case gen_udp:send(U,IP,Port,[?EBOOT_REPLY,S0#state.priority,
+ int16(S0#state.listen_port),
+ S0#state.version])
+ of
+ ok -> ok;
+ {error, not_owner} ->
+ error_logger:error_msg("** Illegal boot server connection attempt: "
+ "not owner of ~w ** ~n", [U]);
+ {error, Reason} ->
+ Err = file:format_error(Reason),
+ error_logger:error_msg("** Illegal boot server connection attempt: "
+ "~w POSIX error ** ~n", [U, Err])
+ end,
{noreply,S0};
{false,_,_} ->
error_logger:error_msg("** Illegal boot server connection attempt: "