Bugfix: machi_projection:new/6 derp: argument order mistake

This commit is contained in:
Scott Lystig Fritchie 2015-07-10 16:41:28 +09:00
parent cf9ae5b555
commit 4d41c59e19
3 changed files with 7 additions and 4 deletions

View file

@ -344,7 +344,7 @@ code_change(_OldVsn, S, _Extra) ->
make_none_projection(MyName, All_list, MembersDict) ->
Down_list = All_list,
UPI_list = [],
machi_projection:new(MyName, MembersDict, UPI_list, Down_list, [], []).
machi_projection:new(MyName, MembersDict, Down_list, UPI_list, [], []).
get_my_private_proj_boot_info(MgrOpts, DefaultDict, DefaultProj) ->
get_my_proj_boot_info(MgrOpts, DefaultDict, DefaultProj, private).

View file

@ -35,7 +35,7 @@
%% @doc Create a new projection record.
new(MyName, MemberDict, UPI_list, Down_list, Repairing_list, Ps) ->
new(MyName, MemberDict, Down_list, UPI_list, Repairing_list, Ps) ->
new(0, MyName, MemberDict, Down_list, UPI_list, Repairing_list, Ps).
%% @doc Create a new projection record.

View file

@ -78,9 +78,12 @@ compare_test() ->
try_it(MyName, All_list, UPI_list, Down_list, Repairing_list, Ps) ->
try
P = machi_projection:new(MyName, All_list, UPI_list, Down_list,
P = machi_projection:new(MyName, All_list, Down_list, UPI_list,
Repairing_list, Ps),
is_record(P, projection_v1)
Down_list = P#projection_v1.down,
UPI_list = P#projection_v1.upi,
Repairing_list = P#projection_v1.repairing,
true
catch _:_ ->
false
end.