aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/manager/snmpm_net_if.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/snmp/src/manager/snmpm_net_if.erl')
-rw-r--r--lib/snmp/src/manager/snmpm_net_if.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/snmp/src/manager/snmpm_net_if.erl b/lib/snmp/src/manager/snmpm_net_if.erl
index 4ec24af7f3..ad39157721 100644
--- a/lib/snmp/src/manager/snmpm_net_if.erl
+++ b/lib/snmp/src/manager/snmpm_net_if.erl
@@ -464,13 +464,17 @@ do_close_log(_) ->
code_change({down, _Vsn}, OldState, downgrade_to_pre_4_16) ->
?d("code_change(down) -> entry", []),
- State = OldState#state{log = snmp_log:downgrade(OldState#state.log)},
+ {OldLog, Type} = OldState#state.log,
+ NewLog = snmp_log:downgrade(OldLog),
+ State = OldState#state{log = {NewLog, Type}},
{ok, State};
% upgrade
code_change(_Vsn, OldState, upgrade_from_pre_4_16) ->
?d("code_change(up) -> entry", []),
- State = OldState#state{log = snmp_log:upgrade(OldState#state.log)},
+ {OldLog, Type} = OldState#state.log,
+ NewLog = snmp_log:upgrade(OldLog),
+ State = OldState#state{log = {NewLog, Type}},
{ok, State};
code_change(_Vsn, State, _Extra) ->