aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent/snmp_user_based_sm_mib.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2012-02-24 15:29:04 +0100
committerMicael Karlberg <[email protected]>2012-02-24 15:29:04 +0100
commit92e37200fdfba41a625615b5b8e8308e363393aa (patch)
tree8dc6fbc743008403083062b0936099b907ae5c1d /lib/snmp/src/agent/snmp_user_based_sm_mib.erl
parent045810f873df73a09b105d051eed244be2edf7ee (diff)
downloadotp-92e37200fdfba41a625615b5b8e8308e363393aa.tar.gz
otp-92e37200fdfba41a625615b5b8e8308e363393aa.tar.bz2
otp-92e37200fdfba41a625615b5b8e8308e363393aa.zip
[snmp/agent] Improve error handling while reading agent config files
Improve error handling while reading agent config files. OTP-9943
Diffstat (limited to 'lib/snmp/src/agent/snmp_user_based_sm_mib.erl')
-rw-r--r--lib/snmp/src/agent/snmp_user_based_sm_mib.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/snmp/src/agent/snmp_user_based_sm_mib.erl b/lib/snmp/src/agent/snmp_user_based_sm_mib.erl
index 69cebc858b..2e801622e7 100644
--- a/lib/snmp/src/agent/snmp_user_based_sm_mib.erl
+++ b/lib/snmp/src/agent/snmp_user_based_sm_mib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2012. 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
@@ -136,7 +136,7 @@ do_reconfigure(Dir) ->
read_usm_config_files(Dir) ->
?vdebug("read usm config file",[]),
- Gen = fun(D) -> generate_usm(D) end,
+ Gen = fun(D, Reason) -> generate_usm(D, Reason) end,
Filter = fun(Usms) -> Usms end,
Check = fun(Entry) -> check_usm(Entry) end,
[Usms] =
@@ -144,7 +144,7 @@ read_usm_config_files(Dir) ->
Usms.
-generate_usm(Dir) ->
+generate_usm(Dir, _Reason) ->
info_msg("Incomplete configuration. Generating empty usm.conf.", []),
USMFile = filename:join(Dir, "usm.conf"),
ok = file:write_file(USMFile, list_to_binary([])).