Avoid putting inner_summary in dbg proplist

This commit is contained in:
Scott Lystig Fritchie 2015-07-10 17:03:22 +09:00
parent 4d41c59e19
commit ed7dcd14db
2 changed files with 15 additions and 8 deletions

View file

@ -975,12 +975,12 @@ react_to_env_A30(Retries, P_latest, LatestUnanimousP, _ReadExtra,
P_inner2 = machi_projection:update_checksum(
P_inner#projection_v1{epoch_number=FinalInnerEpoch,
creation_time=FinalCreation}),
InnerInfo = [{inner_summary,
machi_projection:make_summary(P_inner2)}],
DbgX = replace(P_newprop3#projection_v1.dbg, InnerInfo),
?REACT({a30, ?LINE, DbgX}),
{P_newprop3#projection_v1{dbg=DbgX,
inner=P_inner2}, S_i};
InnerInfo = [],
?REACT({a30, ?LINE, [{inner_summary,
machi_projection:make_summary(P_inner2)}]}),
P_newprop4 = machi_projection:update_checksum(
P_newprop3#projection_v1{inner=P_inner2}),
{P_newprop4, S_i};
{_, P_newprop3_flap_count} ->
?REACT({a30, ?LINE,[{newprop3_flap_count,P_newprop3_flap_count},
{flap_limit, FlapLimit}]}),

View file

@ -147,10 +147,17 @@ make_summary(#projection_v1{epoch_number=EpochNum,
author_server=Author,
upi=UPI_list,
repairing=Repairing_list,
inner=Inner,
dbg=Dbg, dbg2=Dbg2}) ->
InnerInfo = if is_record(Inner, projection_v1) ->
[{inner, make_summary(Inner)}];
true ->
[]
end,
[{epoch,EpochNum},{author,Author},
{upi,UPI_list},{repair,Repairing_list},{down,Down_list},
{d,Dbg}, {d2,Dbg2}].
{upi,UPI_list},{repair,Repairing_list},{down,Down_list}] ++
InnerInfo ++
[{d,Dbg}, {d2,Dbg2}].
%% @doc Make a `p_srvr_dict()' out of a list of `p_srvr()' or out of a
%% `p_srvr_dict()'.