aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src
diff options
context:
space:
mode:
authorMarcus Arendt <[email protected]>2014-09-01 10:27:16 +0200
committerMarcus Arendt <[email protected]>2014-09-01 10:27:16 +0200
commit48f7c246fa044a5a995e3b8efcb10face0b2b201 (patch)
tree26a27bc8361565fbd9f94e1a5d41ed3154c0b350 /lib/mnesia/src
parenta8e12f7168c14cc765a63a51c838d065412795d7 (diff)
parent144f3e9c79a87f6477fdf547ce162a5d885aa201 (diff)
downloadotp-48f7c246fa044a5a995e3b8efcb10face0b2b201.tar.gz
otp-48f7c246fa044a5a995e3b8efcb10face0b2b201.tar.bz2
otp-48f7c246fa044a5a995e3b8efcb10face0b2b201.zip
Merge branch 'maint-17' into maint
Conflicts: OTP_VERSION
Diffstat (limited to 'lib/mnesia/src')
-rw-r--r--lib/mnesia/src/mnesia_controller.erl15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/mnesia/src/mnesia_controller.erl b/lib/mnesia/src/mnesia_controller.erl
index fe2fd67d71..5a9bae54da 100644
--- a/lib/mnesia/src/mnesia_controller.erl
+++ b/lib/mnesia/src/mnesia_controller.erl
@@ -300,8 +300,13 @@ mnesia_down(Node) ->
end.
wait_for_schema_commit_lock() ->
- link(whereis(?SERVER_NAME)),
- unsafe_call(wait_for_schema_commit_lock).
+ try
+ Pid = whereis(?SERVER_NAME),
+ link(Pid), %% Keep the link until release_schema_commit_lock
+ gen_server:call(Pid, wait_for_schema_commit_lock, infinity)
+ catch _:_ ->
+ mnesia:abort({node_not_running, node()})
+ end.
block_controller() ->
call(block_controller).
@@ -557,12 +562,6 @@ cast(Msg) ->
abcast(Nodes, Msg) ->
gen_server:abcast(Nodes, ?SERVER_NAME, Msg).
-unsafe_call(Msg) ->
- case whereis(?SERVER_NAME) of
- undefined -> {error, {node_not_running, node()}};
- Pid -> gen_server:call(Pid, Msg, infinity)
- end.
-
call(Msg) ->
case whereis(?SERVER_NAME) of
undefined ->