diff options
author | Micael Karlberg <[email protected]> | 2012-01-31 13:51:01 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2012-01-31 13:51:01 +0100 |
commit | 92f9d6023275fbdf9a644c1061a5d1def49d13a3 (patch) | |
tree | 685a5c0e569dccb92a963c7087b7372acb1ed826 /lib/snmp/src/agent/snmpa_agent.erl | |
parent | b55c3d29a3d9efce2ce6548963809fc3b7ab8729 (diff) | |
parent | b16baad540d35b890c0c6baf9a1be2a90ea96239 (diff) | |
download | otp-92f9d6023275fbdf9a644c1061a5d1def49d13a3.tar.gz otp-92f9d6023275fbdf9a644c1061a5d1def49d13a3.tar.bz2 otp-92f9d6023275fbdf9a644c1061a5d1def49d13a3.zip |
Merge branch 'maint-r13' into bmk/snmp/snmp4217_integration/r14
Conflicts:
lib/snmp/doc/src/notes.xml
lib/snmp/doc/src/snmpa.xml
lib/snmp/src/agent/snmpa_mpd.erl
lib/snmp/src/app/snmp.appup.src
lib/snmp/test/snmp_agent_test.erl
lib/snmp/vsn.mk
Diffstat (limited to 'lib/snmp/src/agent/snmpa_agent.erl')
-rw-r--r-- | lib/snmp/src/agent/snmpa_agent.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/snmp/src/agent/snmpa_agent.erl b/lib/snmp/src/agent/snmpa_agent.erl index 17cb9c9fe3..9cc986cf47 100644 --- a/lib/snmp/src/agent/snmpa_agent.erl +++ b/lib/snmp/src/agent/snmpa_agent.erl @@ -1262,7 +1262,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), @@ -1279,7 +1280,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}; |