The following sections show the original ics-maintenance.asl CLEAR rule and the modified CLEAR rule (with the eventObj->UserDefined2=YES line added)
Original ics-maintenance.asl CLEAR rule
CLEAR {
eventTimestamp:integer fs
eventType:"NL_CLEAR" fs
eventClass:word fs
eventDispName:rep(word) fs
eventName:word fs
eventObj:FIND_NOTIFICATION_OBJECT
} do {
// When any other notification clears if the notification is in maintenance TRUE change it to FALSE
if (eventObj->InMaintenance) { //Is it in maintenance?
eventObj->addAuditEntry("Maint", "InMaint", "End of maintenance");
eventObj->InMaintenance = FALSE; //Set it to not in maintenance
changeResult = eventObj->changed(); //Let server know the notification has changed.
if (debug) {
print("DEBUG - MaintHandl: Set InMaintenance FALSE on: ".eventObj->Name);
print("DEBUG - MaintHandl: notification NL_CLEAR change result: ".changeResult);
}
}
}
Modified CLEAR rule in ics-maintenance.asl
CLEAR {
eventTimestamp:integer fs
eventType:"NL_CLEAR" fs
eventClass:word fs
eventDispName:rep(word) fs
eventName:word fs
eventObj:FIND_NOTIFICATION_OBJECT
} do {
// When any other notification clears if the notification is in maintenance TRUE change it to FALSE
if (eventObj->InMaintenance) { //Is it in maintenance?
eventObj->addAuditEntry("Maint", "InMaint", "End of maintenance");
eventObj->InMaintenance = FALSE; //Set it to not in maintenance
eventObj->UserDefined2=YES; // Set UserDefined2 attribute
changeResult = eventObj->changed(); //Let server know the notification has changed.
if (debug) {
print("DEBUG - MaintHandl: Set InMaintenance FALSE on: ".eventObj->Name);
print("DEBUG - MaintHandl: notification NL_CLEAR change result: ".changeResult);
}
}
}