Ticket #343 (closed defect: fixed)
Bug in state transitions
| Reported by: | spaetz | Owned by: | mickey |
|---|---|---|---|
| Priority: | major | Milestone: | milestone5.5 |
| Component: | framework/odeviced | Version: | |
| Keywords: | Cc: |
Description
Please assign to mickey, I discussed this with in on IRC.
The attach (yet untested) patch solves this problem:
1) if we currently prohibitTransition to a state we will check if we are in that exact state and go back by one, currently. As e.g. requesting the Resource "Display" prohibits state "idle_dim" this means that we will be thrown back to "busy" if we are in "idle_dim" but nothing will happen if we are already in "idle_prelock". The attached patch will solve that by throwing us into the last allowed state if we are *in or beyond* the prohibited state.
(A theoretical issue is that "previousState" currently wraps around when we are in the beginning. So if *something* prohibits state "awake" it will go into "suspend" state. But it behaved the same way before this patch).
Generally, I think it would be more efficient to use indices as state parameters rather than throwing strings around and looking up their index all the time. But that is a minor (and probably future issue).
Attachments
Change History
Changed 3 years ago by spaetz
-
attachment
framework_subsystems_odeviced_idlenotifier.py.diff
added
comment:1 Changed 3 years ago by spaetz
- Owner changed from jluebbe to mickey
- Component changed from framework/oeventsd to framework/odeviced
comment:3 Changed 3 years ago by mickey
- Status changed from new to closed
- Resolution set to fixed
Should be fixed in [5355d64b43c0b677bbabb07d394b0f4161f5c1b4].

patch to framework/subsystems/odeviced/idlenotifier.py