aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/src/mnesia_controller.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2011-08-26 15:34:22 +0200
committerDan Gudmundsson <[email protected]>2011-09-15 15:34:19 +0200
commit34f20bde33f7c4480ac78f56c7aa1a50ac12b14d (patch)
tree919038ae8d7728b2461eb896f106faf2fee82449 /lib/mnesia/src/mnesia_controller.erl
parent06f4e74bc2849ea8934ddbb1388b44e16b27b16f (diff)
downloadotp-34f20bde33f7c4480ac78f56c7aa1a50ac12b14d.tar.gz
otp-34f20bde33f7c4480ac78f56c7aa1a50ac12b14d.tar.bz2
otp-34f20bde33f7c4480ac78f56c7aa1a50ac12b14d.zip
[mnesia] Fix schema conversion to previous versions
Diffstat (limited to 'lib/mnesia/src/mnesia_controller.erl')
-rw-r--r--lib/mnesia/src/mnesia_controller.erl18
1 files changed, 3 insertions, 15 deletions
diff --git a/lib/mnesia/src/mnesia_controller.erl b/lib/mnesia/src/mnesia_controller.erl
index 8a02fe0226..1d3bd55b48 100644
--- a/lib/mnesia/src/mnesia_controller.erl
+++ b/lib/mnesia/src/mnesia_controller.erl
@@ -287,21 +287,9 @@ get_remote_cstructs() ->
%% Old function kept for backwards compatibility; converts cstructs before sending.
get_cstructs() ->
- {cstructs, Cstructs, Running} = Reply = call(get_cstructs),
- case is_remote_call() of
- {true, Node} ->
- {cstructs, normalize_cstructs(Cstructs, Node), Running};
- false ->
- Reply
- end.
-
-is_remote_call() ->
- case node(group_leader()) of
- N when N =/= node() ->
- {true, N};
- _ ->
- false
- end.
+ {cstructs, Cstructs, Running} = call(get_cstructs),
+ Node = node(group_leader()),
+ {cstructs, normalize_cstructs(Cstructs, Node), Running}.
normalize_cstructs(Cstructs, Node) ->
%% backward-compatibility hack; normalize before returning