Author: rfm
Date: Fri Jan 30 11:00:16 2015
New Revision: 38310
URL: http://svn.gna.org/viewcvs/gnustep?rev=38310&view=rev
Log:
Tweak coalescing
Modified:
libs/ec/trunk/ChangeLog
libs/ec/trunk/EcAlarmDestination.m
Modified: libs/ec/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/ChangeLog?rev=38310&r1=38309&r2=38310&view=diff
==============================================================================
--- libs/ec/trunk/ChangeLog (original)
+++ libs/ec/trunk/ChangeLog Fri Jan 30 11:00:16 2015
@@ -1,4 +1,12 @@
+2015-01-30 Richard Frith-Macdonald <[email protected]>
+
+ * EcAlarmDestination.m: When coalescing alarms, do not coalesce a
+ clear with anything other than an earlier clear for the same event.
+ We do not want to risk forwarding a clear without a preceding
+ event raising the alarm.
+
2015-01-26 Richard Frith-Macdonald <[email protected]>
+
* GNUmakefile.preamble: fixup gcc flag filtering
* EcClientI.h:
* EcClientI.m:
Modified: libs/ec/trunk/EcAlarmDestination.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcAlarmDestination.m?rev=38310&r1=38309&r2=38310&view=diff
==============================================================================
--- libs/ec/trunk/EcAlarmDestination.m (original)
+++ libs/ec/trunk/EcAlarmDestination.m Fri Jan 30 11:00:16 2015
@@ -71,6 +71,22 @@
{
[_alarmQueue addObject: event];
}
+ else if ([event perceivedSeverity] == EcAlarmSeverityCleared)
+ {
+ NSUInteger index;
+
+ /* Event clears may only be coalesced with other clears,
+ * otherwise we might have a case where a clear is sent
+ * to the alarm sink without a corresponding alarm having
+ * been raised.
+ */
+ index = [_alarmQueue indexOfObject: event];
+ [_alarmQueue addObject: event];
+ if (NSNotFound != index)
+ {
+ [_alarmQueue removeObjectAtIndex: index];
+ }
+ }
else
{
[event retain];
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs