From b27432ee4f0d0809ea668cd9e4fcb4f601652cbd Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Wed, 9 Nov 2011 14:05:51 +0100 Subject: Bad note store GC timer deactivation. Wrong field in the state record was set (timeout instead active). Stefan Grundmann OTP-9690 --- lib/snmp/doc/src/notes.xml | 49 +++++++++++++++++++++++++++++++++++ lib/snmp/src/app/snmp.appup.src | 18 +++++++++++++ lib/snmp/src/misc/snmp_note_store.erl | 15 ++++++++--- lib/snmp/vsn.mk | 2 +- 4 files changed, 79 insertions(+), 5 deletions(-) diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index 9e1a060dee..decde4746a 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -32,6 +32,55 @@ notes.xml +
+ SNMP Development Toolkit 4.21.2 +

Version 4.21.2 supports code replacement in runtime from/to + version 4.21.1, 4.21, 4.20.1, 4.20 and 4.19.

+ +
+ Improvements and new features +

-

+ + + +
+ +
+ Fixed Bugs and Malfunctions + + + + +

Bad note store GC timer deactivation. + Wrong field in the state record was set (timeout instead active).

+

Stefan Grundmann

+

Own Id: OTP-9690

+
+ +
+
+ + +
+ Incompatibilities +

-

+
+ +
+ +
SNMP Development Toolkit 4.21.1

Version 4.21.1 supports code replacement in runtime from/to diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src index 0b6ea93231..b4b5367169 100644 --- a/lib/snmp/src/app/snmp.appup.src +++ b/lib/snmp/src/app/snmp.appup.src @@ -22,8 +22,14 @@ %% ----- U p g r a d e ------------------------------------------------------- [ + {"4.21.1", + [ + {update, snmp_note_store, soft, soft_purge, soft_purge, []} + ] + }, {"4.21", [ + {update, snmp_note_store, soft, soft_purge, soft_purge, []}, {load_module, snmp_target_mib, soft_purge, soft_purge, []} ] }, @@ -40,6 +46,7 @@ {load_module, snmpa_mpd, soft_purge, soft_purge, [snmp_conf, snmp_config]}, {load_module, snmpa_conf, soft_purge, soft_purge, [snmp_config]}, + {update, snmp_note_store, soft, soft_purge, soft_purge, []}, {update, snmpa_agent, soft, soft_purge, soft_purge, [snmpa_mpd]}, {update, snmpm_config, soft, soft_purge, soft_purge, [snmp_conf]}, {update, snmpm_server, soft, soft_purge, soft_purge, @@ -61,6 +68,7 @@ {load_module, snmpa_mpd, soft_purge, soft_purge, [snmp_conf, snmp_config]}, {load_module, snmpa_conf, soft_purge, soft_purge, [snmp_config]}, + {update, snmp_note_store, soft, soft_purge, soft_purge, []}, {update, snmpa_agent, soft, soft_purge, soft_purge, [snmpa_mpd]}, {update, snmpm_config, soft, soft_purge, soft_purge, [snmp_conf]}, {update, snmpm_server, soft, soft_purge, soft_purge, @@ -99,6 +107,7 @@ {load_module, snmp_community_mib, soft_purge, soft_purge, []}, {load_module, snmp_target_mib, soft_purge, soft_purge, [snmp_conf]}, + {update, snmp_note_store, soft, soft_purge, soft_purge, []}, {update, snmpm_net_if, soft, soft_purge, soft_purge, [snmp_conf, snmpm_mpd, snmpm_config]}, {update, snmpm_config, soft, soft_purge, soft_purge, [snmp_conf]}, @@ -115,8 +124,14 @@ %% ------D o w n g r a d e --------------------------------------------------- [ + {"4.21.1", + [ + {update, snmp_note_store, soft, soft_purge, soft_purge, []} + ] + }, {"4.21", [ + {update, snmp_note_store, soft, soft_purge, soft_purge, []}, {load_module, snmp_target_mib, soft_purge, soft_purge, []} ] }, @@ -133,6 +148,7 @@ {load_module, snmpa_mpd, soft_purge, soft_purge, [snmp_conf, snmp_config]}, {load_module, snmpa_conf, soft_purge, soft_purge, [snmp_config]}, + {update, snmp_note_store, soft, soft_purge, soft_purge, []}, {update, snmpa_agent, soft, soft_purge, soft_purge, [snmpa_mpd]}, {update, snmpm_config, soft, soft_purge, soft_purge, [snmp_conf]}, {update, snmpm_server, soft, soft_purge, soft_purge, @@ -154,6 +170,7 @@ {load_module, snmpa_mpd, soft_purge, soft_purge, [snmp_conf, snmp_config]}, {load_module, snmpa_conf, soft_purge, soft_purge, [snmp_config]}, + {update, snmp_note_store, soft, soft_purge, soft_purge, []}, {update, snmpa_agent, soft, soft_purge, soft_purge, [snmpa_mpd]}, {update, snmpm_config, soft, soft_purge, soft_purge, [snmp_conf]}, {update, snmpm_server, soft, soft_purge, soft_purge, @@ -192,6 +209,7 @@ {load_module, snmp_community_mib, soft_purge, soft_purge, []}, {load_module, snmp_target_mib, soft_purge, soft_purge, [snmp_conf]}, + {update, snmp_note_store, soft, soft_purge, soft_purge, []}, {update, snmpm_net_if, soft, soft_purge, soft_purge, [snmp_conf, snmpm_mpd, snmpm_config]}, {update, snmpm_config, soft, soft_purge, soft_purge, [snmp_conf]}, diff --git a/lib/snmp/src/misc/snmp_note_store.erl b/lib/snmp/src/misc/snmp_note_store.erl index a21a6209f1..23fccf8a5f 100644 --- a/lib/snmp/src/misc/snmp_note_store.erl +++ b/lib/snmp/src/misc/snmp_note_store.erl @@ -258,10 +258,17 @@ code_change({down, _Vsn}, State, _Extra) -> {ok, NState}; % upgrade -code_change(_Vsn, State, _Extra) -> +code_change(_Vsn, State0, _Extra) -> process_flag(trap_exit, true), - NState = restart_timer(State), - {ok, NState}. + State1 = + case State0 of + #state{timeout = false} -> + State0#state{timeout = ?timeout}; + _ -> + State0 + end, + State2 = restart_timer(State1), + {ok, State2}. %%---------------------------------------------------------- @@ -282,7 +289,7 @@ deactivate_timer(#state{timer = Pid, active = true} = State) -> receive deactivated -> ok end, - State#state{timeout = false}; + State#state{active = false}; deactivate_timer(State) -> State. diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk index c95e0a22d1..0819ab9b36 100644 --- a/lib/snmp/vsn.mk +++ b/lib/snmp/vsn.mk @@ -17,6 +17,6 @@ # # %CopyrightEnd% -SNMP_VSN = 4.21.1 +SNMP_VSN = 4.21.2 PRE_VSN = APP_VSN = "snmp-$(SNMP_VSN)$(PRE_VSN)" -- cgit v1.2.3