summaryrefslogtreecommitdiff
path: root/bin/bbackupd/BackupDaemon.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-03-22 23:26:37 +0000
committerChris Wilson <chris+github@qwirx.com>2007-03-22 23:26:37 +0000
commiteee4907406d6292b215a2d7453cfaa144a3da336 (patch)
tree168885b280eecda510d9165dd79b902ef899b13f /bin/bbackupd/BackupDaemon.h
parent5461fbd6ccf29b092900bcecd3a30c4c6c201e02 (diff)
Add a new notification constant, NotifyEvent_BackupError, for use when
an exception occurs during the backup. Make bbackupd notify sysadmin when an exception occurs during the backup, using this error code, and the notification string "backup-error". Change NotifyEvent__MAX to be one greater than the highest notification constant, makes code more maintainable. (refs #3)
Diffstat (limited to 'bin/bbackupd/BackupDaemon.h')
-rw-r--r--bin/bbackupd/BackupDaemon.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/bbackupd/BackupDaemon.h b/bin/bbackupd/BackupDaemon.h
index cf812001..64b06949 100644
--- a/bin/bbackupd/BackupDaemon.h
+++ b/bin/bbackupd/BackupDaemon.h
@@ -82,8 +82,9 @@ public:
enum
{
NotifyEvent_StoreFull = 0,
- NotifyEvent_ReadError = 1,
- NotifyEvent__MAX = 1
+ NotifyEvent_ReadError,
+ NotifyEvent_BackupError,
+ NotifyEvent__MAX
// When adding notifications, remember to add strings to NotifySysadmin()
};
void NotifySysadmin(int Event);
@@ -177,7 +178,7 @@ private:
CommandSocketInfo *mpCommandSocketInfo;
// Stop notifications being repeated.
- bool mNotificationsSent[NotifyEvent__MAX + 1];
+ bool mNotificationsSent[NotifyEvent__MAX];
// Unused entries in the root directory wait a while before being deleted
box_time_t mDeleteUnusedRootDirEntriesAfter; // time to delete them