From 516708326db6887190425f5c020e66dfe3666a67 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Sun, 20 Dec 2015 16:23:20 +0100 Subject: Be resilient to diameter_service state upgrades By not failing in code that looks up state: pick_peer and service_info. --- lib/diameter/src/base/diameter_service.erl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl index a31cef2c8c..ed22ef7801 100644 --- a/lib/diameter/src/base/diameter_service.erl +++ b/lib/diameter/src/base/diameter_service.erl @@ -206,7 +206,7 @@ stop_transport(SvcName, [_|_] = Refs) -> info(SvcName, Item) -> case lookup_state(SvcName) of - [#state{} = S] -> + [S] -> service_info(Item, S); [] -> undefined @@ -215,7 +215,12 @@ info(SvcName, Item) -> %% lookup_state/1 lookup_state(SvcName) -> - ets:lookup(?STATE_TABLE, SvcName). + case ets:lookup(?STATE_TABLE, SvcName) of + [#state{}] = L -> + L; + _ -> + [] + end. %% --------------------------------------------------------------------------- %% # subscribe/1 -- cgit v1.2.3 From 464492d2ebe24bc13c91fbc99550c05eead599d4 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Sun, 20 Dec 2015 10:23:44 +0100 Subject: Update/fix appup for 17.5.6.7 OTP-12947 strict_mbit OTP-12969 watchdog function_clause OTP-13137 request leak diameter_config (that allows the new option) should be loaded after the others. Anchor was missing from one regexp. Patches did not accumulate through older versions. --- lib/diameter/src/diameter.appup.src | 66 ++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 38 deletions(-) diff --git a/lib/diameter/src/diameter.appup.src b/lib/diameter/src/diameter.appup.src index adb3f960ff..7d66557162 100644 --- a/lib/diameter/src/diameter.appup.src +++ b/lib/diameter/src/diameter.appup.src @@ -36,45 +36,40 @@ {"1.4.4", [{restart_application, diameter}]}, {"1.5", [{restart_application, diameter}]}, %% R16B03 {"1.6", [{restart_application, diameter}]}, %% 17.0 - {<<"1\\.(7(\\.1)?|8)$">>, %% 17.[134] + {<<"^1\\.(7(\\.1)?|8)$">>, %% 17.[134] [{restart_application, diameter}]}, {<<"^1.9(\\.1)?$">>, %% 17.5(.3)? - [{load_module, diameter_codec}, - {load_module, diameter_traffic}, - {load_module, diameter_sctp}, - {load_module, diameter_peer_fsm}, + [{restart_application, diameter}]}, + {"1.9.2", [{load_module, diameter_peer_fsm}, %% 17.5.5 {load_module, diameter_watchdog}, {load_module, diameter_stats}, - {load_module, diameter_config}, + {load_module, diameter_codec}, {load_module, diameter_lib}, {load_module, diameter_peer}, {load_module, diameter_reg}, {load_module, diameter_service}, {load_module, diameter_session}, {load_module, diameter_sync}, + {load_module, diameter_traffic}, + {load_module, diameter_sctp}, {load_module, diameter_gen_base_rfc6733}, {load_module, diameter_gen_acct_rfc6733}, {load_module, diameter_gen_base_rfc3588}, {load_module, diameter_gen_base_accounting}, - {load_module, diameter_gen_relay}]}, - {"1.9.2", [{load_module, diameter_peer_fsm}, %% 17.5.5 - {load_module, diameter_watchdog}, - {load_module, diameter_stats}, - {load_module, diameter_config}, + {load_module, diameter_gen_relay}, + {load_module, diameter}, + {load_module, diameter_config}]}, + {"1.9.2.1", [{load_module, diameter_watchdog}, %% 17.5.6.3 {load_module, diameter_codec}, - {load_module, diameter_lib}, - {load_module, diameter_peer}, - {load_module, diameter_reg}, - {load_module, diameter_service}, - {load_module, diameter_session}, - {load_module, diameter_sync}, {load_module, diameter_traffic}, - {load_module, diameter_sctp}, + {load_module, diameter_service}, {load_module, diameter_gen_base_rfc6733}, {load_module, diameter_gen_acct_rfc6733}, {load_module, diameter_gen_base_rfc3588}, {load_module, diameter_gen_base_accounting}, - {load_module, diameter_gen_relay}]} + {load_module, diameter_gen_relay}, + {load_module, diameter, + {load_module, diameter_config}}]} ], [ {"0.9", [{restart_application, diameter}]}, @@ -93,44 +88,39 @@ {"1.4.4", [{restart_application, diameter}]}, {"1.5", [{restart_application, diameter}]}, {"1.6", [{restart_application, diameter}]}, - {<<"1\\.(7(\\.1)?|8)$">>, + {<<"^1\\.(7(\\.1)?|8)$">>, [{restart_application, diameter}]}, {<<"^1.9(\\.1)?$">>, - [{load_module, diameter_gen_relay}, + [{restart_application, diameter}]}, + {"1.9.2", [{load_module, diameter_config}, + {load_module, diameter}, + {load_module, diameter_gen_relay}, {load_module, diameter_gen_base_accounting}, {load_module, diameter_gen_base_rfc3588}, {load_module, diameter_gen_acct_rfc6733}, {load_module, diameter_gen_base_rfc6733}, + {load_module, diameter_sctp}, + {load_module, diameter_traffic}, {load_module, diameter_sync}, {load_module, diameter_session}, {load_module, diameter_service}, {load_module, diameter_reg}, {load_module, diameter_peer}, {load_module, diameter_lib}, - {load_module, diameter_config}, + {load_module, diameter_codec}, {load_module, diameter_stats}, {load_module, diameter_watchdog}, - {load_module, diameter_peer_fsm}, - {load_module, diameter_sctp}, - {load_module, diameter_traffic}, - {load_module, diameter_codec}]}, - {"1.9.2", [{load_module, diameter_gen_relay}, + {load_module, diameter_peer_fsm}]}, + {"1.9.2.1", [{load_module, diameter_config}, + {load_module, diameter}, + {load_module, diameter_gen_relay}, {load_module, diameter_gen_base_accounting}, {load_module, diameter_gen_base_rfc3588}, {load_module, diameter_gen_acct_rfc6733}, {load_module, diameter_gen_base_rfc6733}, - {load_module, diameter_sctp}, - {load_module, diameter_traffic}, - {load_module, diameter_sync}, - {load_module, diameter_session}, {load_module, diameter_service}, - {load_module, diameter_reg}, - {load_module, diameter_peer}, - {load_module, diameter_lib}, + {load_module, diameter_traffic}, {load_module, diameter_codec}, - {load_module, diameter_config}, - {load_module, diameter_stats}, - {load_module, diameter_watchdog}, - {load_module, diameter_peer_fsm}]} + {load_module, diameter_watchdog}]} ] }. -- cgit v1.2.3 From 68198c72bc4924d42ea54b4ea0997109ec59cfeb Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Sun, 20 Dec 2015 11:01:24 +0100 Subject: vsn -> 1.9.2.2 --- lib/diameter/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/diameter/vsn.mk b/lib/diameter/vsn.mk index a16b8d712c..18b77e243f 100644 --- a/lib/diameter/vsn.mk +++ b/lib/diameter/vsn.mk @@ -16,5 +16,5 @@ # %CopyrightEnd% APPLICATION = diameter -DIAMETER_VSN = 1.9.2.1 +DIAMETER_VSN = 1.9.2.2 APP_VSN = $(APPLICATION)-$(DIAMETER_VSN)$(PRE_VSN) -- cgit v1.2.3