Bug 23940

Summary: Wrong conditional logic in ck-history.c
Product: ConsoleKit Reporter: william.jon.mccann
Component: DaemonAssignee: william.jon.mccann
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description william.jon.mccann 2009-09-14 12:42:09 UTC
Steve Grubb points out:

"In tools/ck-history.cm, line 238 the value of etype is checked to see if its 
not equal to CK_LOG_EVENT_SEAT_SESSION_REMOVED. In that case, aren't the other 
checks of etype unneeded since they by definition are not 
CK_LOG_EVENT_SEAT_SESSION_REMOVED? I suspect that the != should be a ==."
Comment 2 william.jon.mccann 2009-09-14 13:11:40 UTC
commit 3afb5dc9c0a8ee8e1259fea6bd4b6d5fdede2d5f
Author: William Jon McCann <jmccann@redhat.com>
Date:   Mon Sep 14 16:08:16 2009 -0400

    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)"

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.