diff --git a/ChangeLog b/ChangeLog index 8c30d48..041d947 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,13 @@ 2014-05-16 Richard Frith-Macdonald - EcAlarmDestination.m: Perform all connection operations in + * EcAlarmDestination.m: Perform all connection operations in main thread (forwarding etc) and ensure that we run the current run loop while waiting for startup and shutdown. + * EcLogger.m: Use floating point flush interval for modern + systems which run faster and might want to flush more than + once per second. + * GNUmakefile: bump subminor version number for release + Version 1.1.3 release 2014-05-14 Richard Frith-Macdonald diff --git a/EcCommand.m b/EcCommand.m index 840bd5a..f6fc993 100644 --- a/EcCommand.m +++ b/EcCommand.m @@ -579,13 +579,39 @@ static NSString* cmdWord(NSArray* a, unsigned int pos) { EcClientI *r; - /* - * See if we have a fitting client - and update records. + /* See if we have a fitting client - and update records. */ r = [self findIn: clients byObject: (id)from]; if (r != nil) { + NSString *n = [r name]; + [r gnip: num]; + + /* After the first ping response from a client we assume + * that client has completed startup and is running OK. + * We can therefore clear any loss of client alarm. + */ + if (nil != [alarmed member: n]) + { + NSString *managedObject; + EcAlarm *a; + + [alarmed removeObject: n]; + managedObject = EcMakeManagedObject(host, n, nil); + a = [EcAlarm alarmForManagedObject: managedObject + at: nil + withEventType: EcAlarmEventTypeProcessingError + probableCause: EcAlarmSoftwareProgramAbnormallyTerminated + specificProblem: @"Process availability" + perceivedSeverity: EcAlarmSeverityCleared + proposedRepairAction: nil + additionalText: nil]; + [self alarm: a]; + [self clearConfigurationFor: managedObject + specificProblem: @"Process launch" + additionalText: @"Process is now running"]; + } } } } @@ -2020,24 +2046,7 @@ static NSString* cmdWord(NSArray* a, unsigned int pos) } else { - NSString *managedObject; - EcAlarm *a; - [obj setTransient: NO]; - [alarmed removeObject: n]; - managedObject = EcMakeManagedObject(host, n, nil); - a = [EcAlarm alarmForManagedObject: managedObject - at: nil - withEventType: EcAlarmEventTypeProcessingError - probableCause: EcAlarmSoftwareProgramAbnormallyTerminated - specificProblem: @"Process availability" - perceivedSeverity: EcAlarmSeverityCleared - proposedRepairAction: nil - additionalText: nil]; - [self alarm: a]; - [self clearConfigurationFor: managedObject - specificProblem: @"Process launch" - additionalText: @"Process is now running"]; [self information: m from: nil to: nil type: LT_AUDIT]; } [self update]; diff --git a/EcLogger.h b/EcLogger.h index 04178a6..0ad8606 100644 --- a/EcLogger.h +++ b/EcLogger.h @@ -35,7 +35,7 @@ NSRecursiveLock *lock; NSDate *last; NSTimer *timer; - unsigned interval; + NSTimeInterval interval; unsigned size; NSMutableString *message; EcLogType type; diff --git a/EcLogger.m b/EcLogger.m index 3386e10..e3a54cf 100644 --- a/EcLogger.m +++ b/EcLogger.m @@ -79,7 +79,7 @@ static NSArray *modes; = [[NSString alloc] initWithFormat: @"BS%@Flush", logger->key]; logger->serverKey = [[NSString alloc] initWithFormat: @"BS%@Server", logger->key]; - logger->interval = 1.0; + logger->interval = 10.0; logger->size = 8 * 1024; logger->message = [[NSMutableString alloc] initWithCapacity: 2048]; @@ -524,18 +524,13 @@ static NSArray *modes; } } - /* - * Is the program to flush at intervals or at - * a particular buffer size (or both)? + /* Is the program to flush at intervals or at + * a particular buffer size (or both)? */ str = [defs stringForKey: flushKey]; if (str == nil) { str = [defs stringForKey: @"BSDefaultFlush"]; // Default settings. - if (str == nil) - { - str = [defs stringForKey: @"BSDebugFlush"]; // Backward compat. - } } if (str != nil) { diff --git a/EcProcess.m b/EcProcess.m index 0a4994b..dc26078 100644 --- a/EcProcess.m +++ b/EcProcess.m @@ -2346,6 +2346,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval); [self _connectionRegistered]; [self cmdAudit: @"Started `%@'", [self cmdName]]; + [self cmdFlushLogs]; loop = [NSRunLoop currentRunLoop]; while (YES == [EcProcConnection isValid]) diff --git a/GNUmakefile b/GNUmakefile index cbcdaf3..bcfe4df 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -25,7 +25,7 @@ include $(GNUSTEP_MAKEFILES)/common.make -include ../local.make PACKAGE_NAME=EnterpriseControlConfigurationLogging -PACKAGE_VERSION=1.1.2 +PACKAGE_VERSION=1.1.3 Ec_INTERFACE_VERSION=1.1 SVN_BASE_URL=svn+ssh://svn.gna.org/svn/gnustep/libs