Bug in state transitions
|Reported by:||spaetz||Owned by:||mickey|
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).
Change History (4)
Changed 6 years ago by spaetz
comment:1 Changed 6 years ago by spaetz
- Component changed from framework/oeventsd to framework/odeviced
- Owner changed from jluebbe to mickey