aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-09-01 17:20:34 +0200
committerErlang/OTP <[email protected]>2010-09-01 17:20:34 +0200
commitc9e24bdf95c7d0d1e2f0ecce24a1ffc1102b0ec2 (patch)
treedfc024f5fd6850c65bd6a8c342423d85c74aecae /lib/kernel
parent76ac94968e28fb4b0dc38ed7062849efe61c50e6 (diff)
parent334e0ea11f8740a1102ab8411a959cf8b364eb4d (diff)
downloadotp-c9e24bdf95c7d0d1e2f0ecce24a1ffc1102b0ec2.tar.gz
otp-c9e24bdf95c7d0d1e2f0ecce24a1ffc1102b0ec2.tar.bz2
otp-c9e24bdf95c7d0d1e2f0ecce24a1ffc1102b0ec2.zip
Merge branch 'hb/kernel/net_set_ticktime/OTP-8787' of ../hasse_otp into HEAD
* 'hb/kernel/net_set_ticktime/OTP-8787' of ../hasse_otp: Fix a bug that could cause the net_kernel process to crash.
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/src/net_kernel.erl4
-rw-r--r--lib/kernel/test/erl_distribution_SUITE.erl2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/kernel/src/net_kernel.erl b/lib/kernel/src/net_kernel.erl
index 1353ac65c6..9875044844 100644
--- a/lib/kernel/src/net_kernel.erl
+++ b/lib/kernel/src/net_kernel.erl
@@ -500,8 +500,8 @@ handle_call({new_ticktime,T,TP}, From, #state{tick = #tick{ticker = Tckr,
time = T,
how = How}}}, From);
-handle_call({new_ticktime,From,_},
- _,
+handle_call({new_ticktime,_T,_TP},
+ From,
#state{tick = #tick_change{time = T}} = State) ->
async_reply({reply, {ongoing_change_to, T}, State}, From).
diff --git a/lib/kernel/test/erl_distribution_SUITE.erl b/lib/kernel/test/erl_distribution_SUITE.erl
index d15f6aa0d5..21a96f804a 100644
--- a/lib/kernel/test/erl_distribution_SUITE.erl
+++ b/lib/kernel/test/erl_distribution_SUITE.erl
@@ -273,6 +273,7 @@ tick_change(Config) when is_list(Config) ->
?line PaDir = filename:dirname(code:which(?MODULE)),
?line [BN, CN] = get_nodenames(2, tick_change),
?line DefaultTT = net_kernel:get_net_ticktime(),
+ ?line unchanged = net_kernel:set_net_ticktime(DefaultTT, 60),
?line case DefaultTT of
I when is_integer(I) -> ?line ok;
_ -> ?line ?t:fail(DefaultTT)
@@ -377,6 +378,7 @@ run_tick_change_test(B, C, PrevTT, TT, PaDir) ->
end,
?line change_initiated = net_kernel:set_net_ticktime(TT,20),
+ ?line {ongoing_change_to,_} = net_kernel:set_net_ticktime(TT,20),
?line sleep(3),
?line change_initiated = rpc:call(B,net_kernel,set_net_ticktime,[TT,15]),
?line sleep(7),