Skip to content

Commit

Permalink
Merge branch 'anders/diameter/patch/R15B02/OTP-10555' into maint-r15
Browse files Browse the repository at this point in the history
* anders/diameter/patch/R15B02/OTP-10555:
  vsn -> 1.2.1
  Update appup for OTP-10461/10550
  Allow for no diameter on remote node in connection guard
  Add missing clause for peer failover
  • Loading branch information
Erlang/OTP committed Nov 5, 2012
2 parents d2258a8 + eaa782f commit 210d354
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
8 changes: 6 additions & 2 deletions lib/diameter/src/base/diameter.appup.src
Expand Up @@ -38,12 +38,16 @@
%% unmodified but including modified diameter.hrl
{load, diameter_callback},
{load, diameter_capx},
{load, diameter_types}]}
{load, diameter_types}]},
{"1.2", [{load, diameter_codec},
{load, diameter_peer_fsm}]}
],
[
{"0.9", [{restart_application, diameter}]},
{"0.10", [{restart_application, diameter}]},
{"1.0", [{restart_application, diameter}]},
{"1.1", [{restart_application, diameter}]}
{"1.1", [{restart_application, diameter}]},
{"1.2", [{load, diameter_codec},
{load, diameter_peer_fsm}]}
]
}.
3 changes: 3 additions & 0 deletions lib/diameter/src/base/diameter_codec.erl
Expand Up @@ -333,6 +333,9 @@ decode_header(_) ->
%% wraparound counter. The 8-bit counter is incremented each time the
%% system is restarted.

sequence_numbers({_,_} = T) ->
T;

sequence_numbers(#diameter_packet{bin = Bin})
when is_binary(Bin) ->
sequence_numbers(Bin);
Expand Down
10 changes: 7 additions & 3 deletions lib/diameter/src/base/diameter_peer_fsm.erl
Expand Up @@ -967,12 +967,16 @@ dpa_timer() ->
%% both fail to do so this isn't foolproof.

register_everywhere(T) ->
diameter_reg:add_new(T)
andalso unregistered(T).
diameter_reg:add_new(T) andalso unregistered(T).

unregistered(T) ->
{ResL, _} = rpc:multicall(?MODULE, match, [{node(), T}]),
lists:all(fun(L) -> [] == L end, ResL).
lists:all(fun nomatch/1, ResL).

nomatch({badrpc, {'EXIT', {undef, _}}}) -> %% no diameter on remote node
true;
nomatch(L) ->
[] == L.

match({Node, _})
when Node == node() ->
Expand Down
2 changes: 1 addition & 1 deletion lib/diameter/vsn.mk
Expand Up @@ -18,7 +18,7 @@
# %CopyrightEnd%

APPLICATION = diameter
DIAMETER_VSN = 1.2
DIAMETER_VSN = 1.2.1
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(DIAMETER_VSN)$(PRE_VSN)"

Expand Down

0 comments on commit 210d354

Please sign in to comment.