diff options
Diffstat (limited to 'lib/snmp/src')
-rw-r--r-- | lib/snmp/src/agent/snmpa_local_db.erl | 2 | ||||
-rw-r--r-- | lib/snmp/src/agent/snmpa_set_lib.erl | 77 | ||||
-rw-r--r-- | lib/snmp/src/compile/snmpc.src | 13 | ||||
-rw-r--r-- | lib/snmp/src/misc/snmp_note_store.erl | 2 |
4 files changed, 45 insertions, 49 deletions
diff --git a/lib/snmp/src/agent/snmpa_local_db.erl b/lib/snmp/src/agent/snmpa_local_db.erl index df01091d53..5b04c70054 100644 --- a/lib/snmp/src/agent/snmpa_local_db.erl +++ b/lib/snmp/src/agent/snmpa_local_db.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/snmp/src/agent/snmpa_set_lib.erl b/lib/snmp/src/agent/snmpa_set_lib.erl index 9f355855b4..f5218d5409 100644 --- a/lib/snmp/src/agent/snmpa_set_lib.erl +++ b/lib/snmp/src/agent/snmpa_set_lib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -368,47 +368,44 @@ make_value_a_correct_value(Value, ASN1Type, Mfa) -> dbg_apply(M,F,A) -> case maybe_verbose_apply(M, F, A) of - %% <Future proofing> - %% As of R15 we get extra info containing, - %% among other things, line numbers. - {'EXIT', {undef, [{M, F, A, _} | _]}} -> - {'EXIT', {hook_undef, {M, F, A}}}; - {'EXIT', {function_clause, [{M, F, A, _} | _]}} -> - {'EXIT', {hook_function_clause, {M, F, A}}}; - - %% This is really overkill, but just to be on the safe side... - {'EXIT', {undef, {M, F, A, _}}} -> - {'EXIT', {hook_undef, {M, F, A}}}; - {'EXIT', {function_clause, {M, F, A, _}}} -> - {'EXIT', {hook_function_clause, {M, F, A}}}; - %% </Future proofing> - - - %% Old format format for compatibility - {'EXIT', {undef, [{M, F, A} | _]}} -> - {'EXIT', {hook_undef, {M, F, A}}}; - {'EXIT', {function_clause, [{M, F, A} | _]}} -> - {'EXIT', {hook_function_clause, {M, F, A}}}; - - % XYZ: Older format for compatibility - {'EXIT', {undef, {M, F, A}}} -> - {'EXIT', {hook_undef, {M, F, A}}}; - {'EXIT', {function_clause, {M, F, A}}} -> - {'EXIT', {hook_function_clause, {M, F, A}}}; - - Result -> - Result + %% <Future proofing> + %% As of R15 we get extra info containing, + %% among other things, line numbers. + {'EXIT', {undef, [{M, F, A, _} | _]}} -> + {'EXIT', {hook_undef, {M, F, A}}}; + {'EXIT', {function_clause, [{M, F, A, _} | _]}} -> + {'EXIT', {hook_function_clause, {M, F, A}}}; + + %% This is really overkill, but just to be on the safe side... + {'EXIT', {undef, {M, F, A, _}}} -> + {'EXIT', {hook_undef, {M, F, A}}}; + {'EXIT', {function_clause, {M, F, A, _}}} -> + {'EXIT', {hook_function_clause, {M, F, A}}}; + %% </Future proofing> + + %% Old format format for compatibility + {'EXIT', {undef, [{M, F, A} | _]}} -> + {'EXIT', {hook_undef, {M, F, A}}}; + {'EXIT', {function_clause, [{M, F, A} | _]}} -> + {'EXIT', {hook_function_clause, {M, F, A}}}; + + % XYZ: Older format for compatibility + {'EXIT', {undef, {M, F, A}}} -> + {'EXIT', {hook_undef, {M, F, A}}}; + {'EXIT', {function_clause, {M, F, A}}} -> + {'EXIT', {hook_function_clause, {M, F, A}}}; + + Result -> + Result end. - maybe_verbose_apply(M, F, A) -> case get(verbosity) of - false -> - (catch apply(M,F,A)); - _ -> - ?vlog("~n apply: ~w,~w,~p~n", [M,F,A]), - Res = (catch apply(M,F,A)), - ?vlog("~n returned: ~p", [Res]), - Res + false -> + (catch apply(M,F,A)); + _ -> + ?vlog("~n apply: ~w,~w,~p~n", [M,F,A]), + Res = (catch apply(M,F,A)), + ?vlog("~n returned: ~p", [Res]), + Res end. - diff --git a/lib/snmp/src/compile/snmpc.src b/lib/snmp/src/compile/snmpc.src index 9d1af42764..6eb95be35e 100644 --- a/lib/snmp/src/compile/snmpc.src +++ b/lib/snmp/src/compile/snmpc.src @@ -404,13 +404,12 @@ e(Reason) -> otp_release() -> system_info(otp_release, string). - system_info(Tag, Type) -> case (catch erlang:system_info(Tag)) of - {'EXIT', _} -> - "-"; - Info when is_list(Info) andalso (Type =:= string) -> - Info; - Info -> - lists:flatten(io_lib:format("~w", [Info])) + {'EXIT', _} -> + "-"; + Info when is_list(Info) andalso (Type =:= string) -> + Info; + Info -> + lists:flatten(io_lib:format("~w", [Info])) end. diff --git a/lib/snmp/src/misc/snmp_note_store.erl b/lib/snmp/src/misc/snmp_note_store.erl index 23fccf8a5f..608fdcd9ca 100644 --- a/lib/snmp/src/misc/snmp_note_store.erl +++ b/lib/snmp/src/misc/snmp_note_store.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. +%% Copyright Ericsson AB 1996-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in |