summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-10-08 23:21:48 +0000
committerChris Wilson <chris+github@qwirx.com>2007-10-08 23:21:48 +0000
commit62a12cbab2e91bf9eadada6df9150772797426bb (patch)
treec085d663b21bd31ab2eea7d5eacfe05422f6e4f8
parent2fa6c87580a49695f1f2b5c321f708f82827f6ac (diff)
Fix crash when notifyscript is called for BackupStart or BackupFinish.
-rw-r--r--bin/bbackupd/BackupDaemon.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/bin/bbackupd/BackupDaemon.cpp b/bin/bbackupd/BackupDaemon.cpp
index cfeb320e..b96f6225 100644
--- a/bin/bbackupd/BackupDaemon.cpp
+++ b/bin/bbackupd/BackupDaemon.cpp
@@ -2278,16 +2278,18 @@ void BackupDaemon::NotifySysadmin(int Event)
return;
}
- // Is there a notifation script?
+ // Is there a notification script?
const Configuration &conf(GetConfiguration());
- if(!conf.KeyExists("NotifyScript") &&
- Event != NotifyEvent_BackupStart &&
- Event != NotifyEvent_BackupFinish)
+ if(!conf.KeyExists("NotifyScript"))
{
// Log, and then return
- BOX_ERROR("Not notifying administrator about event "
- << sEventNames[Event] << " -- set NotifyScript "
- "to do this in future");
+ if(Event != NotifyEvent_BackupStart &&
+ Event != NotifyEvent_BackupFinish)
+ {
+ BOX_ERROR("Not notifying administrator about event "
+ << sEventNames[Event] << " -- set NotifyScript "
+ "to do this in future");
+ }
return;
}