From 229795aba1d4da773938715f2e5122d4885af826 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Fri, 7 Sep 2018 18:31:16 +0200 Subject: [snmp] Add proper version Also fixed case clause. OTP-15287 (ERIERL-206) --- lib/snmp/doc/src/notes.xml | 4 ++-- lib/snmp/src/misc/snmp_log.erl | 17 +++++++---------- lib/snmp/vsn.mk | 4 ++-- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index f64e0cca97..1607363ad1 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -4,7 +4,7 @@
- 19962017 + 19962018 Ericsson AB. All Rights Reserved. @@ -48,7 +48,7 @@ - +
SNMP 5.2.10 diff --git a/lib/snmp/src/misc/snmp_log.erl b/lib/snmp/src/misc/snmp_log.erl index ce93b95c8e..5713c14912 100644 --- a/lib/snmp/src/misc/snmp_log.erl +++ b/lib/snmp/src/misc/snmp_log.erl @@ -652,8 +652,8 @@ do_log_to_file(Log, TextFile, Mibs, Start, Stop) -> {Tag, S} when (Tag =:= ok) orelse (Tag =:= error) -> io:format(Fd, "~s", [S]), Tag; - X -> - X + Ignore -> + Ignore end end, Res = (catch loop(Log, Write)), @@ -696,8 +696,8 @@ loop({Cont, Terms}, Log, Write, NumOK, NumERR) -> loop(disk_log:chunk(Log, Cont), Log, Write, NumOK+AddedOK, NumERR+AddedERR) catch - T:E -> - {error, {T, E}} + C:E:S -> + {error, {C, E, S}} end; loop({Cont, Terms, BadBytes}, Log, Write, NumOK, NumERR) -> error_logger:error_msg("Skipping ~w bytes while converting ~p~n~n", @@ -707,8 +707,8 @@ loop({Cont, Terms, BadBytes}, Log, Write, NumOK, NumERR) -> loop(disk_log:chunk(Log, Cont), Log, Write, NumOK+AddedOK, NumERR+AddedERR) catch - T:E -> - {error, {T, E}} + C:E:S -> + {error, {C, E, S}} end. @@ -718,16 +718,13 @@ loop_terms(Terms, Write) -> loop_terms([], _Write, NumOK, NumERR) -> {ok, {NumOK, NumERR}}; loop_terms([Term|Terms], Write, NumOK, NumERR) -> - try Write(Term) of + case Write(Term) of ok -> loop_terms(Terms, Write, NumOK+1, NumERR); error -> loop_terms(Terms, Write, NumOK, NumERR+1); _ -> loop_terms(Terms, Write, NumOK, NumERR) - catch - T:E:S -> - {error, {T, E, S}} end. diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk index 96123f02f5..4d5a0fbce8 100644 --- a/lib/snmp/vsn.mk +++ b/lib/snmp/vsn.mk @@ -2,7 +2,7 @@ # %CopyrightBegin% # -# Copyright Ericsson AB 1997-2017. All Rights Reserved. +# Copyright Ericsson AB 1997-2018. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,6 +19,6 @@ # %CopyrightEnd% APPLICATION = snmp -SNMP_VSN = 5.2.11 +SNMP_VSN = 5.2.12 PRE_VSN = APP_VSN = "$(APPLICATION)-$(SNMP_VSN)$(PRE_VSN)" -- cgit v1.2.3