Removed slave.configured flag.
authorFlorian Pose <fp@igh-essen.com>
Tue, 09 Jan 2007 13:57:34 +0000
changeset 520 d778acff9592
parent 519 54787e1b57d4
child 521 a25593417791
Removed slave.configured flag.
master/fsm.c
master/slave.c
master/slave.h
--- a/master/fsm.c	Tue Jan 09 13:42:38 2007 +0000
+++ b/master/fsm.c	Tue Jan 09 13:57:34 2007 +0000
@@ -325,20 +325,13 @@
         if (slave->error_flag
             || !slave->online
             || slave->requested_state == EC_SLAVE_STATE_UNKNOWN
-            || (slave->current_state == slave->requested_state
-                && slave->configured)) continue;
+            || slave->current_state == slave->requested_state) continue;
 
         if (master->debug_level) {
             ec_state_string(slave->current_state, old_state);
-            if (slave->current_state != slave->requested_state) {
-                ec_state_string(slave->requested_state, new_state);
-                EC_DBG("Changing state of slave %i (%s -> %s).\n",
-                       slave->ring_position, old_state, new_state);
-            }
-            else if (!slave->configured) {
-                EC_DBG("Reconfiguring slave %i (%s).\n",
-                       slave->ring_position, old_state);
-            }
+            ec_state_string(slave->requested_state, new_state);
+            EC_DBG("Changing state of slave %i (%s -> %s).\n",
+                   slave->ring_position, old_state, new_state);
         }
 
         fsm->master_state = ec_fsm_master_configure_slave;
@@ -1315,8 +1308,6 @@
         return;
     }
 
-    slave->configured = 1;
-
     if (master->debug_level) {
         EC_DBG("Slave %i is now in INIT.\n", slave->ring_position);
     }
--- a/master/slave.c	Tue Jan 09 13:42:38 2007 +0000
+++ b/master/slave.c	Tue Jan 09 13:57:34 2007 +0000
@@ -112,7 +112,6 @@
 
     slave->requested_state = EC_SLAVE_STATE_UNKNOWN;
     slave->current_state = EC_SLAVE_STATE_UNKNOWN;
-    slave->configured = 0;
     slave->error_flag = 0;
     slave->online = 1;
     slave->fmmu_count = 0;
--- a/master/slave.h	Tue Jan 09 13:42:38 2007 +0000
+++ b/master/slave.h	Tue Jan 09 13:57:34 2007 +0000
@@ -197,7 +197,6 @@
 
     ec_slave_state_t requested_state; /**< requested slave state */
     ec_slave_state_t current_state; /**< current slave state */
-    unsigned int configured; /**< the slave was configured by this master */
     unsigned int error_flag; /**< stop processing after an error */
     unsigned int online; /**< non-zero, if the slave responds. */