Skip to content
  • Christian Kellner's avatar
    device: update state directly after authorization · 2396c90c
    Christian Kellner authored
    Before this change, the state of the device was update after
    authorization either directly in the case of error or in the case of
    successful authorization, indirectly via the uevent, which would then
    lead to a call to device_update_from_udev.  As a result of this the
    status would get updated only *after* the call to
    bolt_device_authorize is already finished (and the D-Bus method return
    on the client) for the brief period between the method return and the
    uevent the status of the device would not reflect the actual state.
    
    Therefore we now use bolt_auth_to_state to directly update the device
    state in both, error and success, cases.  We still keep the uevent
    mechanism in place because that ensures we will stay in sync with
    external events (i.e.  events not cause by us).
    2396c90c