summaryrefslogtreecommitdiffstats
path: root/state.rb
diff options
context:
space:
mode:
authorCasey Dahlin <cdahlin@redhat.com>2008-10-10 10:56:34 -0400
committerCasey Dahlin <cdahlin@redhat.com>2008-10-10 10:56:34 -0400
commit415e277bff45093b7c359270317a5d0b47ff2687 (patch)
treea921832859f6c3e2a07db064a09582afbd6e9814 /state.rb
parentbc5e3bb025d247629b7175f9676d3a2da765142d (diff)
downloadupstate-415e277bff45093b7c359270317a5d0b47ff2687.tar.gz
upstate-415e277bff45093b7c359270317a5d0b47ff2687.tar.xz
upstate-415e277bff45093b7c359270317a5d0b47ff2687.zip
Fix bugs in State::process_event
State::process_event was only checking states that were up, when it should do the opposite, and wasn't forwarding parameters from the event.
Diffstat (limited to 'state.rb')
-rw-r--r--state.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/state.rb b/state.rb
index f476401..56322a1 100644
--- a/state.rb
+++ b/state.rb
@@ -239,9 +239,9 @@ class State
def State.process_event(event)
raise TypeError unless event.is_a? Event
count = 0
- @@states.select{ |x| x.status == :up }.each do
+ @@states.select{ |x| x.status == :down }.each do |x|
next unless x.react_to? event
- x.hold(:system)
+ x.hold(:system, event.params)
count += 1
end
count