From 62a12cbab2e91bf9eadada6df9150772797426bb Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 8 Oct 2007 23:21:48 +0000 Subject: Fix crash when notifyscript is called for BackupStart or BackupFinish. --- bin/bbackupd/BackupDaemon.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'bin') 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; } -- cgit v1.2.3