master/master.c
changeset 133 b36d187ecc0b
parent 130 69c2645300ee
child 135 80d493917205
--- a/master/master.c	Mon Mar 27 12:04:55 2006 +0000
+++ b/master/master.c	Mon Mar 27 15:52:08 2006 +0000
@@ -711,24 +711,17 @@
             first = 0;
         }
         if (master->slave_states & EC_SLAVE_STATE_PREOP) {
-            if (!first) {
-                printk(", ");
-                first = 0;
-            }
+            if (!first) printk(", ");
             printk("PREOP");
+            first = 0;
         }
         if (master->slave_states & EC_SLAVE_STATE_SAVEOP) {
-            if (!first) {
-                printk(", ");
-                first = 0;
-            }
+            if (!first) printk(", ");
             printk("SAVEOP");
+            first = 0;
         }
         if (master->slave_states & EC_SLAVE_STATE_OP) {
-            if (!first) {
-                printk(", ");
-                first = 0;
-            }
+            if (!first) printk(", ");
             printk("OP");
         }
         printk(")\n");
@@ -860,6 +853,14 @@
         if (unlikely(ec_slave_state_change(slave, EC_SLAVE_STATE_PREOP)))
             return -1;
 
+        // Fetch SDO list
+        if (slave->sii_mailbox_protocols & EC_MBOX_COE) {
+            if (unlikely(ec_slave_fetch_sdo_list(slave))) {
+                EC_ERR("Could not fetch SDO list!\n");
+                return -1;
+            }
+        }
+
         // Slaves that are not registered are only brought into PREOP
         // state -> nice blinking and mailbox comm. possible
         if (!slave->registered && !slave->type->bus_coupler) {