diff options
author | Erlang/OTP <[email protected]> | 2012-01-27 11:34:41 +0100 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2012-01-27 11:34:41 +0100 |
commit | b16baad540d35b890c0c6baf9a1be2a90ea96239 (patch) | |
tree | 4b3249ae0822213e59d7bd371ebe09d6eda32246 /lib/snmp/src/agent/snmpa_agent.erl | |
parent | e0e862b42d508b5112395f41584bed90c74a8a92 (diff) | |
parent | 980c05769a4146197e5eb0175c6ffacbf4d5634c (diff) | |
download | otp-b16baad540d35b890c0c6baf9a1be2a90ea96239.tar.gz otp-b16baad540d35b890c0c6baf9a1be2a90ea96239.tar.bz2 otp-b16baad540d35b890c0c6baf9a1be2a90ea96239.zip |
Merge branch 'bmk/snmp/snmp4174_integration/r13' into maint-r13
* bmk/snmp/snmp4174_integration/r13:
[snmp/agent] Add proper release notes
[snmp/agent] Wrong OID used for error message reply
[snmp/agent] Added backup check for local_db
[snmp/agent] Simultaneous snmpa:backup/1,2 calls interfere
Diffstat (limited to 'lib/snmp/src/agent/snmpa_agent.erl')
-rw-r--r-- | lib/snmp/src/agent/snmpa_agent.erl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/snmp/src/agent/snmpa_agent.erl b/lib/snmp/src/agent/snmpa_agent.erl index 00fe9be098..e3178aacc6 100644 --- a/lib/snmp/src/agent/snmpa_agent.erl +++ b/lib/snmp/src/agent/snmpa_agent.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2010. All Rights Reserved. +%% Copyright Ericsson AB 1996-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 @@ -1190,7 +1190,8 @@ handle_call(info, _From, S) -> handle_call(get_net_if, _From, S) -> {reply, get(net_if), S}; -handle_call({backup, BackupDir}, From, S) -> +%% Only accept a backup request if there is none already in progress +handle_call({backup, BackupDir}, From, #state{backup = undefined} = S) -> ?vlog("backup: ~p", [BackupDir]), Pid = self(), V = get(verbosity), @@ -1207,7 +1208,11 @@ handle_call({backup, BackupDir}, From, S) -> end), ?vtrace("backup server: ~p", [BackupServer]), {noreply, S#state{backup = {BackupServer, From}}}; - + +handle_call({backup, _BackupDir}, From, #state{backup = Backup} = S) -> + ?vinfo("backup already in progress: ~p", [Backup]), + {reply, {error, backup_in_progress}, S}; + handle_call(dump_mibs, _From, S) -> Reply = snmpa_mib:dump(get(mibserver)), {reply, Reply, S}; |