summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Jon McCann <jmccann@redhat.com>2009-09-14 16:08:16 -0400
committerWilliam Jon McCann <jmccann@redhat.com>2009-09-14 16:08:16 -0400
commit3afb5dc9c0a8ee8e1259fea6bd4b6d5fdede2d5f (patch)
tree1d19e835b73372ddd5ca636dea94ede9560a6cc2
parent81435b3d10d4b124c0a6b4649b4cf74378a26323 (diff)
fix logic for finding session remove events
The logic is supposed to find any type of removal event. This can be one of CK_LOG_EVENT_SEAT_SESSION_REMOVED, CK_LOG_EVENT_SYSTEM_START, CK_LOG_EVENT_SYSTEM_STOP, or CK_LOG_EVENT_SYSTEM_RESTART. This is used to determine if the removal was normal or RECORD_STATUS_CRASH, or RECORD_STATUS_DOWN. And indicated in the report log as something like: "Thu Sep 3 21:28 - down (20:20)"
-rw-r--r--tools/ck-history.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/ck-history.c b/tools/ck-history.c
index 716c3ef..24dc1d0 100644
--- a/tools/ck-history.c
+++ b/tools/ck-history.c
@@ -236,10 +236,10 @@ find_first_matching_remove_event (GList *events,
etype = ((CkLogEvent *)l->data)->type;
/* skip all non removal events */
- if (etype != CK_LOG_EVENT_SEAT_SESSION_REMOVED
- || etype == CK_LOG_EVENT_SYSTEM_START
- || etype == CK_LOG_EVENT_SYSTEM_STOP
- || etype == CK_LOG_EVENT_SYSTEM_RESTART) {
+ if (! (etype == CK_LOG_EVENT_SEAT_SESSION_REMOVED
+ || etype == CK_LOG_EVENT_SYSTEM_START
+ || etype == CK_LOG_EVENT_SYSTEM_STOP
+ || etype == CK_LOG_EVENT_SYSTEM_RESTART)) {
continue;
}