# HG changeset patch
# User Florian Pose <fp@igh-essen.com>
# Date 1161348628 0
# Node ID 0d3022ee35a2522aea41f9f86e60c848405da08e
# Parent  d36808888817560c97643160bdcbabcf080357bd
Fixed bug in master state machine.

diff -r d36808888817 -r 0d3022ee35a2 master/fsm.c
--- a/master/fsm.c	Fri Oct 20 12:45:06 2006 +0000
+++ b/master/fsm.c	Fri Oct 20 12:50:28 2006 +0000
@@ -929,7 +929,6 @@
     ec_master_t *master = fsm->master;
     ec_slave_t *slave = fsm->slave;
 
-
     fsm->slave_state(fsm); // execute slave state machine
 
     if (fsm->slave_state != ec_fsm_end
@@ -1042,8 +1041,8 @@
     fsm->coe_state(fsm); // execute CoE state machine
 
     if (fsm->coe_state == ec_fsm_error) {
-        fsm->slave->error_flag = 1;
-        fsm->slave_state = ec_fsm_error;
+        fsm->master_state = ec_fsm_master_start;
+        fsm->master_state(fsm); // execute immediately
         return;
     }