diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-10-08 23:21:48 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-10-08 23:21:48 +0000 |
commit | 62a12cbab2e91bf9eadada6df9150772797426bb (patch) | |
tree | c085d663b21bd31ab2eea7d5eacfe05422f6e4f8 /bin/bbackupd/BackupDaemon.cpp | |
parent | 2fa6c87580a49695f1f2b5c321f708f82827f6ac (diff) |
Fix crash when notifyscript is called for BackupStart or BackupFinish.
Diffstat (limited to 'bin/bbackupd/BackupDaemon.cpp')
-rw-r--r-- | bin/bbackupd/BackupDaemon.cpp | 16 |
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; } |