Fixed bug causing unloading of realtime module being very slow after topology change.
authorFlorian Pose <fp@igh-essen.com>
Mon, 12 Feb 2007 11:15:23 +0000
changeset 550 f94a9f1bcaea
parent 549 67be4381c820
child 551 ac230bbd1d76
Fixed bug causing unloading of realtime module being very slow after topology change.
TODO
master/master.c
--- a/TODO	Mon Feb 12 11:12:00 2007 +0000
+++ b/TODO	Mon Feb 12 11:15:23 2007 +0000
@@ -7,7 +7,6 @@
 -------------------------------------------------------------------------------
 
 * Release 1.2:
-  - Find bug causing slow unloading after topology change.
   - Introduce topology_change_pending.
   - Update feature lists.
 
--- a/master/master.c	Mon Feb 12 11:12:00 2007 +0000
+++ b/master/master.c	Mon Feb 12 11:15:23 2007 +0000
@@ -513,6 +513,15 @@
         ec_slave_reset(slave);
         ec_slave_request_state(slave, EC_SLAVE_STATE_PREOP);
 
+        // don't try to set PREOP for slaves that don't respond,
+        // because of 3 second timeout.
+        if (!slave->online) {
+            if (master->debug_level)
+                EC_DBG("Skipping to configure offline slave %i.\n",
+                        slave->ring_position);
+            continue;
+        }
+
         ec_fsm_slave_start_conf(&fsm_slave, slave);
         while (ec_fsm_slave_exec(&fsm_slave)) {
             ec_master_sync_io(master);