Corrected output at slave count change.
authorFlorian Pose <fp@igh-essen.com>
Fri, 26 May 2006 14:35:29 +0000
changeset 262 636d43737371
parent 261 44a3a5833c49
child 263 aa6623e5d958
Corrected output at slave count change.
master/fsm.c
--- a/master/fsm.c	Fri May 26 14:28:49 2006 +0000
+++ b/master/fsm.c	Fri May 26 14:35:29 2006 +0000
@@ -217,16 +217,17 @@
     fsm->master_slaves_responding = command->working_counter;
 
     if (topology_change) {
-        if (fsm->master_slaves_responding == master->slave_count) {
-            EC_INFO("%i slave%s responding (VALID).\n",
-                    fsm->master_slaves_responding,
-                    fsm->master_slaves_responding == 1 ? "" : "s");
-            fsm->master_validation = 1; // start validation later
-        }
-        else {
-            EC_WARN("%i slave%s responding. Invalid slave count!\n",
-                    fsm->master_slaves_responding,
-                    fsm->master_slaves_responding == 1 ? "" : "s");
+        EC_INFO("%i slave%s responding.\n",
+                fsm->master_slaves_responding,
+                fsm->master_slaves_responding == 1 ? "" : "s");
+
+        if (master->mode == EC_MASTER_MODE_RUNNING) {
+            if (fsm->master_slaves_responding == master->slave_count) {
+                fsm->master_validation = 1; // start validation later
+            }
+            else {
+                EC_WARN("Invalid slave count. Bus in tainted state.\n");
+            }
         }
     }